TADT-python
TADT-python copied to clipboard
Error with narrow() function
Thanks for sharing this code When I run this code it gives this error c_output = c_output.narrow(i, p[0], c_output.size(i) - p[0])
TypeError: narrow(): argument 'start' (position 2) must be int, not numpy.int64
Thanks for sharing this code When I run this code it gives this error c_output = c_output.narrow(i, p[0], c_output.size(i) - p[0])
TypeError: narrow(): argument 'start' (position 2) must be int, not numpy.int64
it may caused by pytorch version.if your pytorch is 0.4.1 not 1.1.0,
you can change the pad type to solve it,like :
output = F.pad(response, (int(padding[1]), int(padding[1]), int(padding[0]), [int(padding[0])))