snowfall icon indicating copy to clipboard operation
snowfall copied to clipboard

RuntimeError in ctc_att_transformer_train.py

Open csukuangfj opened this issue 3 years ago • 5 comments

See below (using the latest master)

2021-03-29 07:34:23,835 INFO [common.py:270] ================================================================================                
2021-03-29 07:34:23,837 INFO [ctc_att_transformer_train.py:440] epoch 0, learning rate 0
Traceback (most recent call last):
  File "./ctc_att_transformer_train.py", line 508, in <module>
    main()
  File "./ctc_att_transformer_train.py", line 442, in main
    objf, valid_objf, global_batch_idx_train = train_one_epoch(dataloader=train_dl,
  File "./ctc_att_transformer_train.py", line 220, in train_one_epoch
    curr_batch_objf, curr_batch_frames, curr_batch_all_frames = get_objf(
  File "./ctc_att_transformer_train.py", line 95, in get_objf
    nnet_output, encoder_memory, memory_mask = model(feature, supervisions)
  File "/ceph-fj/fangjun/py38/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/root/fangjun/open-source/s2/snowfall/snowfall/models/transformer.py", line 92, in forward
    encoder_memory, memory_mask = self.encode(x, supervision)
  File "/root/fangjun/open-source/s2/snowfall/snowfall/models/transformer.py", line 108, in encode
    x = self.encoder_embed(x)
  File "/ceph-fj/fangjun/py38/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/root/fangjun/open-source/s2/snowfall/snowfall/models/transformer.py", line 384, in forward
    x = self.out(x.transpose(1, 2).contiguous().view(b, t, c * f))
  File "/ceph-fj/fangjun/py38/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/ceph-fj/fangjun/py38/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 93, in forward
    return F.linear(input, self.weight, self.bias)
  File "/ceph-fj/fangjun/py38/lib/python3.8/site-packages/torch/nn/functional.py", line 1692, in linear
    output = input.matmul(weight.t())
RuntimeError: mat1 dim 1 must match mat2 dim 0

csukuangfj avatar Mar 28 '21 23:03 csukuangfj