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

Pytest FAILURES #39

Open
my-yy opened this issue Oct 8, 2018 · 0 comments
Open

Pytest FAILURES #39

my-yy opened this issue Oct 8, 2018 · 0 comments

Comments

@my-yy
Copy link

my-yy commented Oct 8, 2018

When I do pytest, I got this error: 'CTC' object has no attribute '_modules' (The details are shown at the bottom.)
Is there something changed in the 'speech/models' folder?
I used the old folder (I cloned about two month ago) to replace the current one, and the pytest passed.

=========================================================================================== FAILURES ============================================================================================
________________________________________________________________________________________ test_ctc_model _________________________________________________________________________________________

def test_ctc_model():
    freq_dim = 40
    vocab_size = 10

    batch = shared.gen_fake_data(freq_dim, vocab_size)
    batch_size = len(batch[0])
  model = CTC(freq_dim, vocab_size, shared.model_config)

ctc_test.py:16:


self = <[AttributeError("'CTC' object has no attribute '_modules'") raised in repr()] SafeRepr object at 0x107f3a5f0>, freq_dim = 40, output_dim = 10
config = {'dropout': 0.0, 'encoder': {'conv': [[32, 5, 32, 2]], 'rnn': {'bidirectional': False, 'dim': 16, 'layers': 1}}}

def __init__(self, freq_dim, output_dim, config):
  super().__init__(freq_dim, config)

E TypeError: super() takes at least 1 argument (0 given)

../speech/models/ctc_model.py:15: TypeError
___________________________________________________________________________________________ test_save ___________________________________________________________________________________________

def test_save():

    freq_dim = 120
    model = speech.models.Model(freq_dim,
                  shared.model_config)

io_test.py:12:


self = <[AttributeError("'Model' object has no attribute '_modules'") raised in repr()] SafeRepr object at 0x107f4c170>, input_dim = 120
config = {'dropout': 0.0, 'encoder': {'conv': [[32, 5, 32, 2]], 'rnn': {'bidirectional': False, 'dim': 16, 'layers': 1}}}

def __init__(self, input_dim, config):
  super().__init__()

E TypeError: super() takes at least 1 argument (0 given)

../speech/models/model.py:13: TypeError
__________________________________________________________________________________________ test_model ___________________________________________________________________________________________

def test_model():
    time_steps = 100
    freq_dim = 40
    batch_size = 4
  model = speech.models.Model(freq_dim, shared.model_config)

model_test.py:15:


self = <[AttributeError("'Model' object has no attribute '_modules'") raised in repr()] SafeRepr object at 0x107f73f80>, input_dim = 40
config = {'dropout': 0.0, 'encoder': {'conv': [[32, 5, 32, 2]], 'rnn': {'bidirectional': False, 'dim': 16, 'layers': 1}}}

def __init__(self, input_dim, config):
  super().__init__()

E TypeError: super() takes at least 1 argument (0 given)

../speech/models/model.py:13: TypeError
__________________________________________________________________________________________ test_model ___________________________________________________________________________________________

def test_model():
    freq_dim = 120
    vocab_size = 10

    np.random.seed(1337)
    torch.manual_seed(1337)

    conf = shared.model_config
    rnn_dim = conf['encoder']['rnn']['dim']
    conf["decoder"] = {"embedding_dim" : rnn_dim,
                       "layers" : 2}
  model = Seq2Seq(freq_dim, vocab_size + 1, conf)

seq2seq_test.py:21:


self = <[AttributeError("'Seq2Seq' object has no attribute '_modules'") raised in repr()] SafeRepr object at 0x107f45758>, freq_dim = 120, vocab_size = 11
config = {'decoder': {'embedding_dim': 16, 'layers': 2}, 'dropout': 0.0, 'encoder': {'conv': [[32, 5, 32, 2]], 'rnn': {'bidirectional': False, 'dim': 16, 'layers': 1}}}

def __init__(self, freq_dim, vocab_size, config):
  super().__init__(freq_dim, config)

E TypeError: super() takes at least 1 argument (0 given)

../speech/models/seq2seq.py:17: TypeError
============================================================================== 4 failed, 5 passed in 0.79 seconds ===============================================================================

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

1 participant