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

Not a single example in README is running properly. #34

Open
estathop opened this issue Jul 24, 2018 · 2 comments
Open

Not a single example in README is running properly. #34

estathop opened this issue Jul 24, 2018 · 2 comments

Comments

@estathop
Copy link

I tried to execute every single example from the initial README page, but everything throws different errors.

transformer = Seq2VecR2RWord(
    word2vec_model=word2vec,
    max_length=max_length,
    latent_size=200,
    encoding_size=300,
    learning_rate=0.05
)
Traceback (most recent call last):

  File "<ipython-input-42-34cf056a2e62>", line 6, in <module>
    learning_rate=0.05

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/seq2vec/model/seq2vec_R2R_word.py", line 55, in __init__
    learning_rate=learning_rate

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/seq2vec/model/seq2vec_base.py", line 68, in __init__
    self.model, self.encoder = self.create_model()

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/seq2vec/model/seq2vec_R2R_word.py", line 89, in create_model
    )(masked_inputs)

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/keras/layers/wrappers.py", line 325, in __call__
    return super(Bidirectional, self).__call__(inputs, **kwargs)

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/keras/engine/topology.py", line 619, in __call__
    output = self.call(inputs, **kwargs)

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/yklz/recurrent/bidirectional_rnn_encoder.py", line 31, in call
    func_args = inspect.getfullargspec(self.layer.call).args

AttributeError: 'module' object has no attribute 'getfullargspec'
from seq2vec import Seq2VecR2RHash

transformer = Seq2VecR2RHash(
    max_index=1000,
    max_length=10,
    latent_size=20,
    embedding_size=200,
    encoding_size=300,
    learning_rate=0.05
)

Traceback (most recent call last):

  File "<ipython-input-38-0274b84666d1>", line 9, in <module>
    learning_rate=0.05

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/seq2vec/model/seq2vec_R2R_hash.py", line 58, in __init__
    learning_rate

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/seq2vec/model/seq2vec_base.py", line 68, in __init__
    self.model, self.encoder = self.create_model()

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/seq2vec/model/seq2vec_R2R_hash.py", line 96, in create_model
    )(char_embedding)

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/keras/layers/wrappers.py", line 325, in __call__
    return super(Bidirectional, self).__call__(inputs, **kwargs)

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/keras/engine/topology.py", line 619, in __call__
    output = self.call(inputs, **kwargs)

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/yklz/recurrent/bidirectional_rnn_encoder.py", line 31, in call
    func_args = inspect.getfullargspec(self.layer.call).args

AttributeError: 'module' object has no attribute 'getfullargspec'
In [37]: transformer = Seq2VecC2RChar(
      word2vec_model=word2vec,
      max_index=1000,
      max_length=20,
      embedding_size=200,
      latent_size=200,
      learning_rate=0.05,
      channel_size=10,
      conv_size=5
)

Traceback (most recent call last):

  File "<ipython-input-37-1396dd8326f9>", line 9, in <module>
    conv_size=5

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/seq2vec/model/seq2vec_C2R_char.py", line 69, in __init__
    learning_rate

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/seq2vec/model/seq2vec_base.py", line 68, in __init__
    self.model, self.encoder = self.create_model()

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/seq2vec/model/seq2vec_C2R_char.py", line 153, in create_model
    )(encoded_feature)

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/keras/engine/topology.py", line 619, in __call__
    output = self.call(inputs, **kwargs)

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/yklz/recurrent/rnn_decoder.py", line 95, in call
    constants = self.layer.get_constants(inputs, training=None)

  File "/home/estathop/anaconda2/envs/tensorflow/lib/python2.7/site-packages/yklz/recurrent/rnn_cell.py", line 277, in get_constants
    constants = self.recurrent_layer.get_constants(

AttributeError: 'LSTM' object has no attribute 'get_constants'
@estathop
Copy link
Author

estathop commented Jul 24, 2018

and I am sure I have installed those correctly:
pylint
numpy
tensorflow
keras==2.0.8
yoctol_utils
gensim==3.1.0
h5py
yoctol_keras_layer_zoo

@SoluMilken
Copy link
Contributor

Please use python 3.5 or above.

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

No branches or pull requests

2 participants