How to solve `cannot found tensorflow_examples`

Arthur Lee
1 min readDec 16, 2019

Recently I start to touch GAN and I try to understand the code

However, when I run this code

from tensorflow_examples.models.pix2pix import pix2pix

I got the error.

This blog will show you how to fix this bug.

First, Know where is your Python library Path

/Users/XXX/opt/anaconda3/envs/tensorflow/lib/python3.7/site-packages/

Second, then go to the github and clone project

https://github.com/tensorflow/examples

run git clone the project, you will see it overwritten the examples

However it did not work yet.

Finally, move `tensorflow_examples` to upper layer

And restart your kernel in jupyter, now it works!

--

--

Arthur Lee
Arthur Lee

Written by Arthur Lee

An machine learning engineer in Bay Area in the United States

Responses (1)