Skip to content

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

Open

Description

@estathop

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'

Activity

  1. estathop commented on Jul 24, 2018

    @estathop
    Author

    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

  2. SoluMilken commented on Jul 26, 2018

    @SoluMilken
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions