I am trying to use torch.bmm using pytorch version 0.4, as I have an old project in pytorch-0.4 and I have to insert a code snippet into that project for some testing. I took this snippet from another project implemented in a newer version of pytorch. When I am trying to run this code. I am getting this error…
I have also tried torch.matmul but I got the same result.
ts3 = torch.bmm(ts1, ts2)
RuntimeError: cublas runtime error : the GPU program failed to execute at /opt/conda/conda-bld/pytorch_1535491974311/work/aten/src/THC/THCBlas.cu:411
Is it the pytorch version issue, if is it, is there any alternative function for older version, if not, how can I implement this function on my own?
Here is my code snippet which I am trying to add
def call(self, batch_kernel):
B, H, W = batch_kernel.size() #[B, l, l]
ts1 = batch_kernel.view((B, 1, H * W))
ts2 = self.weight.expand((B, ) + self.size)
ts3 = torch.matmul(ts1, ts2)
return ts3.view((B, -1))