Open ericbillwang opened 6 years ago
Above issue was resolved root cause: wrong parameter when instantiate rnn <-- missing batch_first parameter.
After that, got below error in common code <-- Any known issue here ?
File "train.py", line 235, in
Thanks, Ericbill
Base on these information, I think your size of model_output is not correct. The size of the core's output is (50L, 512L) in your case, if you didn't modify the code in class CaptionModel there should be no error.
Connie, Thanks for the comment. I simply try to hack my code as below, so that output can be (50L, 512L), but got other errors... Can you help comment if I have fundamental issue on Wtanh(WvV+WhHt-1) in my original post ? Thanks, Ericbill
output, state = self.rnn(rnn_input, state)
# input: Concatenates(xt, C) in size=(1 * batch_size * input_size)
output = output.squeeze()
(50L, 512L)
(50L, 512L)
Traceback (most recent call last):
File "train.py", line 236, in
issue resolved after implement MLP layer. But the weird thing is, why the program fail w/o implement MLP layer given I already supplied required dimension (50L, 512L) ? Maybe squeeze() function remove some important attribute ?
Hello Ericbill, I have the same issue... What do you mean "after implement MLP player"? Could you give me some hint? Thank you.
Peter
Hi TA,
would you please provide the size for the return of ShowAttendTellCore's forward function? alpha.size() = ? output.size() = ?
that would be better for us to decide to use squeeze/unsqueeze.
Thank you, Eric
The return size of ShowAttendTellCore from my results are alpha.size() = batch x 49 output.size() = batch x rnn_size
I have no idea why your guys have this issue if the dimensions are the same...
I checked alpha and output size from ShowAttendTellCore: alpha.size)_ = batch x 49 output.size() = 1 x batch x rnn_size
after output = output.squeeze() ==> output.size() = batch x rnn_size
However, still get the same error like ericbill.
Hi Fansia, That means some items defined in your init but not used in forward.
Hi Puff,
Thank you. There is a classmate said dataset may be modified unintentionally. I finally solve this problem by getting data.zip from /dataset folder again, and it works.
Hi fansia: I have the same problem about: 'NoneType' object has no attribute 'data' But this issue came from redundant code in the init function (h2rnn & att2rnn) My training can work well just after removing them
Dear TA,
I got below run time error. RuntimeError: Expected hidden size (1, 1L, 512), got (1L, 50L, 512L)
Below is my source code which I confirmed final rnn_input is 1 x batch x input_size Can you give me some idea of debugging direction ?
Thanks, Ericbill