GDL_code icon indicating copy to clipboard operation
GDL_code copied to clipboard

No module named 'utils.loaders'

Open claudiofernandez opened this issue 4 years ago • 2 comments

I am facing a problem when trying to import modules that are inside the folders. For instance in the notebook "03_01_autoencoder_train.ipynb" in the first cell when trying to import the module loaders.py inside the utils folder in order to load the mnist dataset, I get the error "ModuleNotFoundError: No module named 'utils.loaders'".

In the same sense, for instance in the notebook "03_05_vae_faces_train" again in the first cell, when it tries to run the line "from models.VAE import VariationalAutoEncoder" it tries to run the VAE.py inside the folder "models" it also fails in the line "from utils.callbacks import CustomCallback, step_decay_schedule" showing the following error: "ModuleNotFoundError: No module named 'utils.callbacks'".

It seems that it cannot recognize the utils folder in my directory.

I am running this from a jupyter notebook of an Anaconda environment created following step by step the instructions in the book.

Has anyone faced a similar issue? Can anyone help me?

claudiofernandez avatar Jan 25 '21 14:01 claudiofernandez

Mine works fine in Vscode. Maybe try vscode instead of jupyter notebook, then select the same Anaconda environment.

bransonli avatar Feb 07 '21 08:02 bransonli

trying putting tensorflow.utils and also in VAE, change the errors by adding tensorflow. to the starting, cheers mate

JerryJohnThomas avatar Jun 02 '21 21:06 JerryJohnThomas