You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 27, 2020. It is now read-only.
Hi, I'm trying to apply your code to a sequential image dataset.
However, whenever I tried to input concatenated images (Batch x Timeseries x Channels x Width x Height), it gives following error.
<ipython-input-40-c130ba752793> in forward(self, input, h, c)
29 input = input.cuda()
30
---> 31 combined = torch.cat((input, h), dim=1)
32
33 A = self.conv(combined)
TypeError: cat received an invalid combination of arguments - got (tuple, dim=int), but expected one of:
* (sequence[torch.cuda.FloatTensor] seq)
* (sequence[torch.cuda.FloatTensor] seq, int dim)
didn't match because some of the arguments have invalid types: (tuple, dim=int)
It seems like something is wrong with .cuda() declaration.
So I looked into those two Variables input and h
input has torch.FloatTensor type,
h has torch.autograd.variable.Variable type.
From this article, those two Variables have to be changed to same data type.
My question is,
i) Have you undergone the same issue like this?
ii) I've tried to change the data type of h by h.cuda() didn't work. I'm not used to Pytorch. So is there any advice I can get?
BTW thank you for your update. Gave me a lot of help
The text was updated successfully, but these errors were encountered:
I think this problem is caused by the incompatilbe types of 'input' and 'h'. They should both be Variable rather than FloatTensor. Please refer to the document of 'torch.cat' for more details.
Hi, I'm trying to apply your code to a sequential image dataset.
However, whenever I tried to input concatenated images (Batch x Timeseries x Channels x Width x Height), it gives following error.
It seems like something is wrong with .cuda() declaration.
So I looked into those two Variables
input
andh
input
has torch.FloatTensor type,h
has torch.autograd.variable.Variable type.From this article, those two Variables have to be changed to same data type.
My question is,
i) Have you undergone the same issue like this?
ii) I've tried to change the data type of
h
byh.cuda()
didn't work. I'm not used to Pytorch. So is there any advice I can get?BTW thank you for your update. Gave me a lot of help
The text was updated successfully, but these errors were encountered: