Traceback (most recent call last):


 "train.py", line 316, in <module>

main()


 "train.py", line 312, in main

trainModel(model, train, valid, fields, optim)


 "train.py", line 178, in trainModel

train_stats = trainEpoch(epoch)


 "train.py", line 142, in trainEpoch

model(src, tgt, src_lengths, dec_state)


 "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 206, in __call__

result = self.forward(*input, **kwargs)


 "/home/haixu/Desktop/OpenNMT8.21/onmt/Models.py", line 467, in forward

enc_hidden, context = self.encoder(src, lengths)


 "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 206, in __call__

result = self.forward(*input, **kwargs)


 "/home/haixu/Desktop/OpenNMT8.21/onmt/Models.py", line 198, in forward

out = self.transformer[i](out, input[:, :, 0].transpose(0, 1))


 "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 206, in __call__

result = self.forward(*input, **kwargs)


 "/home/haixu/Desktop/OpenNMT8.21/onmt/modules/Transformer.py", line 69, in forward

mid, _ = self.self_attn(input, input, input, mask=mask)


 "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 206, in __call__

result = self.forward(*input, **kwargs)


 "/home/haixu/Desktop/OpenNMT8.21/onmt/modules/MultiHeadedAttn.py", line 39, in forward

aeq(self.d_model % 8, 0)


 "/home/haixu/Desktop/OpenNMT8.21/onmt/modules/Util.py", line 9, in aeq

assert a == base, str(args)
AssertionError: (4, 0)

Traceback (most recent call last):


 "/usr/local/lib/python3.6/site-packages/logbook/handlers.py", line 216, in handle

self.emit(record)


 "/usr/local/lib/python3.6/site-packages/dbt/logger.py", line 461, in emit

'too many messages received before initilization!'
AssertionError: too many messages received before initilization!
