Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed unused imports that were causing errors. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Removed unused imports that were causing errors. #7

wants to merge 1 commit into from

Conversation

ndahlquist
Copy link

I ran into these errors while trying to run DCGAN.ipynb (almost certainly due to different versions of Keras and nltk). Since these particular imports are unused, there is no reason to keep them.

~/workspace/part2/utils2.py in <module>()
     12 from gensim.models import word2vec
     13 from keras.preprocessing.text import Tokenizer
---> 14 from nltk.tokenize import ToktokTokenizer, StanfordTokenizer
     15 from functools import reduce
     16 from itertools import chain

ImportError: cannot import name 'StanfordTokenizer'
~/workspace/part2/utils2.py in <module>()
     20 
     21 from keras_tqdm import TQDMNotebookCallback
---> 22 from keras import initializations
     23 from keras.applications.resnet50 import ResNet50, decode_predictions, conv_block, identity_block
     24 from keras.applications.vgg16 import VGG16

ImportError: cannot import name 'initializations'

Note that many other imports in utils appear unused, but I've left them untouched (wanted to keep changes to a minimum).

Test Plan

  • Verify using PyCharm and grep that the imports are unused.
  • After other fixes, successfully run DCGAN.ipynb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant