PeiqinZhuang/API-Net

Error: RuntimeError: t() expects a tensor with <= 2 dimensions, but self is 4D

Closed this issue · 0 comments

Hello,

Due to computational limitations, I have reduced the n_classes to 5 and n_samples = 2. But in the function pdist() in the file models. py, it is showing the above mentioned error: RuntimeError: t() expects a tensor with <= 2 dimensions, but self is 4D during training time.
pool_out = self.avg(conv_out).squeeze()
This gives pool_out as 4D-tensor.

Can you please check this?

Thanks,