RuntimeError: Trying to create tensor with negative dimension -96: [-96, 1, 9, 9]
nullxjx opened this issue · 2 comments
nullxjx commented
你好,我直接在dat.py文件中使用如下代码测试你的模型,但是报错了,
model = DAT()
x = torch.randn((1, 3, 48, 48)).cuda(0)
y = model(x)
print(y.shape)
报错如下:
RuntimeError: Trying to create tensor with negative dimension -96: [-96, 1, 9, 9]
请问这是什么原因导致的,谢谢~
Vladimir2506 commented
Please refer to configs since the default strides are all -1.
lizian1611 commented
你好,我直接在dat.py文件中使用如下代码测试你的模型,但是报错了,
model = DAT()
x = torch.randn((1, 3, 48, 48)).cuda(0)
y = model(x)
print(y.shape)
报错如下: RuntimeError: Trying to create tensor with negative dimension -96: [-96, 1, 9, 9]
请问这是什么原因导致的,谢谢~
请问,你这里怎么解决的,我也遇到了同样的问题。