keras-text icon indicating copy to clipboard operation
keras-text copied to clipboard

Failed module import

Open tgalery opened this issue 6 years ago • 1 comments

Maybe related to the whole bunch of python 3 issues around the repo, but a simple

from keras_text.models import TokenModelFactory

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-8-96307cb1e937> in <module>()
      1 # Will automagically handle padding for models that require padding (Ex: Yoon Kim CNN)
----> 2 from keras_text.models import TokenModelFactory
      3 from keras_text.models import YoonKimCNN, AttentionRNN, StackedRNN
      4 factory = TokenModelFactory(1, tokenizer.token_index, max_tokens=100, embedding_type='glove.6B.100d')
      5 word_encoder_model = YoonKimCNN()

~/miniconda/envs/deeplearn/lib/python3.6/site-packages/keras_text/models/__init__.py in <module>()
----> 1 from token_model import TokenModelFactory
      2 from sentence_model import SentenceModelFactory
      3 from sequence_encoders import *

tgalery avatar Apr 24 '18 23:04 tgalery

from .token_model import TokenModelFactory from .sentence_model import SentenceModelFactory from .sequence_encoders import *

zuenko avatar Apr 27 '18 18:04 zuenko