NVlabs / pacnet

Pixel-Adaptive Convolutional Neural Networks (CVPR '19)
https://suhangpro.github.io/pac/
Other
514 stars 79 forks source link

Pytorch 1.2.0: Not Implemented Error #8

Closed meshiang closed 5 years ago

meshiang commented 5 years ago

Hello, I am currently running Pytorch 1.2.0 with Cuda 9.2 and Python 3.7, but it seems I ran into "NotImplementedError" for all unittest results. Can anyone provide any solutions?

I ran python test_pac.py and here is the results.

E.E/home/pc3387/Desktop/Reference/pacnet/pac.py:447: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  output = output / (norm + torch.tensor(empty_mask, dtype=input.dtype, device=input.device))
.EE.EEEEEEEEE.EEEE
======================================================================
ERROR: test_conv_all_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 28, in call_wrapped
    f(self, *args, native_impl=True)
  File "test_pac.py", line 145, in test_conv_all_grad
    (im, im_k, conv_w, conv_b)))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_input_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "test_pac.py", line 114, in test_conv_input_grad
    self.assertTrue(_gradcheck(conv, (im, im_k)))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 196, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_sum_all_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 28, in call_wrapped
    f(self, *args, native_impl=True)
  File "test_pac.py", line 334, in test_conv_sum_all_grad
    (im, im_k, conv_w, conv_b), rtol=0.01))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_transpose_all_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 28, in call_wrapped
    f(self, *args, native_impl=True)
  File "test_pac.py", line 179, in test_conv_transpose_all_grad
    (im, im_k, conv_w, conv_b)))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_transpose_input_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "test_pac.py", line 157, in test_conv_transpose_input_grad
    self.assertTrue(_gradcheck(conv, (im, im_k)))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 286, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_transpose_sum_all_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 28, in call_wrapped
    f(self, *args, native_impl=True)
  File "test_pac.py", line 356, in test_conv_transpose_sum_all_grad
    (im, im_k, conv_w, conv_b), rtol=0.01))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_transpose_two_impl_match (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 271, in test_conv_transpose_two_impl_match
    out.sum().backward()
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 286, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_transpose_with_kernel_input_sum_all_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "test_pac.py", line 406, in test_conv_transpose_with_kernel_input_sum_all_grad
    (im, im_k, conv_w, conv_b), rtol=0.01))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 286, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_two_impl_match (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 211, in test_conv_two_impl_match
    out.sum().backward()
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 196, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_with_kernel_input_sum_all_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "test_pac.py", line 390, in test_conv_with_kernel_input_sum_all_grad
    (im, im_k, conv_w, conv_b), rtol=0.01))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 196, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_with_kernel_input_two_impl_match (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 241, in test_conv_with_kernel_input_two_impl_match
    out.sum().backward()
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 196, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_kernel_sum_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "test_pac.py", line 375, in test_kernel_sum_grad
    (im,), rtol=0.01))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_kernel_two_impl_match (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 309, in test_kernel_two_impl_match
    out.sum().backward()
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_pool_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "test_pac.py", line 189, in test_pool_grad
    self.assertTrue(_gradcheck(pool, (im, im_k)))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 343, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_pool_sum_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "test_pac.py", line 366, in test_pool_sum_grad
    self.assertTrue(_gradcheck(lambda x, y: pool(x, y).sum(), (im, im_k), rtol=0.01))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 343, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_pool_two_impl_match (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 293, in test_pool_two_impl_match
    out.sum().backward()
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 343, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_pool_with_kernel_input_sum_grad (__main__.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "test_pac.py", line 419, in test_pool_with_kernel_input_sum_grad
    (im, im_k), rtol=0.01))
  File "test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 343, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

----------------------------------------------------------------------
Ran 21 tests in 10.272s

FAILED (errors=17)
(Pytorch) pc3387@pc3387:~/Desktop/Reference/pacnet$ python -m unittest
E.E/home/pc3387/Desktop/Reference/pacnet/pac.py:447: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  output = output / (norm + torch.tensor(empty_mask, dtype=input.dtype, device=input.device))
.EE.EEEEEEEEE.EEEE
======================================================================
ERROR: test_conv_all_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 28, in call_wrapped
    f(self, *args, native_impl=True)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 145, in test_conv_all_grad
    (im, im_k, conv_w, conv_b)))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_input_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 114, in test_conv_input_grad
    self.assertTrue(_gradcheck(conv, (im, im_k)))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 196, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_sum_all_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 28, in call_wrapped
    f(self, *args, native_impl=True)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 334, in test_conv_sum_all_grad
    (im, im_k, conv_w, conv_b), rtol=0.01))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_transpose_all_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 28, in call_wrapped
    f(self, *args, native_impl=True)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 179, in test_conv_transpose_all_grad
    (im, im_k, conv_w, conv_b)))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_transpose_input_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 157, in test_conv_transpose_input_grad
    self.assertTrue(_gradcheck(conv, (im, im_k)))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 286, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_transpose_sum_all_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 28, in call_wrapped
    f(self, *args, native_impl=True)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 356, in test_conv_transpose_sum_all_grad
    (im, im_k, conv_w, conv_b), rtol=0.01))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_transpose_two_impl_match (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 271, in test_conv_transpose_two_impl_match
    out.sum().backward()
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 286, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_transpose_with_kernel_input_sum_all_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 406, in test_conv_transpose_with_kernel_input_sum_all_grad
    (im, im_k, conv_w, conv_b), rtol=0.01))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 286, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_two_impl_match (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 211, in test_conv_two_impl_match
    out.sum().backward()
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 196, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_with_kernel_input_sum_all_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 390, in test_conv_with_kernel_input_sum_all_grad
    (im, im_k, conv_w, conv_b), rtol=0.01))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 196, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_conv_with_kernel_input_two_impl_match (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 241, in test_conv_with_kernel_input_two_impl_match
    out.sum().backward()
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 196, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_kernel_sum_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 375, in test_kernel_sum_grad
    (im,), rtol=0.01))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_kernel_two_impl_match (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 309, in test_kernel_two_impl_match
    out.sum().backward()
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 130, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_pool_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 189, in test_pool_grad
    self.assertTrue(_gradcheck(pool, (im, im_k)))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 343, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_pool_sum_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 366, in test_pool_sum_grad
    self.assertTrue(_gradcheck(lambda x, y: pool(x, y).sum(), (im, im_k), rtol=0.01))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 343, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_pool_two_impl_match (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 293, in test_pool_two_impl_match
    out.sum().backward()
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 93, in backward
    allow_unreachable=True)  # allow_unreachable flag
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 343, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

======================================================================
ERROR: test_pool_with_kernel_input_sum_grad (test_pac.PacConvTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 29, in call_wrapped
    f(self, *args, native_impl=False)
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 419, in test_pool_with_kernel_input_sum_grad
    (im, im_k), rtol=0.01))
  File "/home/pc3387/Desktop/Reference/pacnet/test_pac.py", line 21, in _gradcheck
    return gradcheck(f, x0, rtol=rtol, atol=atol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 279, in gradcheck
    analytical, reentrant, correct_grad_sizes = get_analytical_jacobian(tupled_inputs, o, nondet_tol=nondet_tol)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 155, in get_analytical_jacobian
    retain_graph=True, allow_unused=True)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in grad
    inputs, allow_unused)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
    return self._forward_cls.backward(self, *args)
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/autograd/function.py", line 189, in wrapper
    outputs = fn(ctx, *args)
  File "/home/pc3387/Desktop/Reference/pacnet/pac.py", line 343, in backward
    ctx._backend.Im2Col_updateGradInput(ctx._backend.library_state,
  File "/home/pc3387/anaconda3/envs/Pytorch/lib/python3.7/site-packages/torch/_thnn/utils.py", line 27, in __getattr__
    raise NotImplementedError
NotImplementedError

----------------------------------------------------------------------
Ran 21 tests in 9.632s

FAILED (errors=17)
meshiang commented 5 years ago

Update: This issue seems to exist because Pytorch 1.2 no longer provide open THNN API for the function Im2Col_updateGradInput. (This particular commit)

Quick Solution: Downgrade to Pytorch 1.1. I do think that the README.md should fixed to only support up to Pytorch 1.1

suhangpro commented 5 years ago

@meshiang Thanks for the information. README is updated accordingly.