I want to concatenate two tensors, but I get the following error:
‘list’ object has no attribute ‘cat’
def forward(self, x): n, c, h, w = x.size() feat = x[0, :, 0, 0] this_img_conv = torch.zeros(c).cuda() this_img_conv = [Variable(this_img_conv)] this_img_conv = this_img_conv.cat(feat, 0)
I want to save the specific vector of x to the new tensor of this_img_conv. How can I achieve this function?