I’m getting this warning since I upgraded to 1.8. I have a custom module that returns tensor, (tensor tensor) which triggers this.
What is this warning trying to say.
  
      github.com
  
  
    pytorch/pytorch/blob/f5a7b2e641a124751dfa3fdf1926eb4135d3aad5/torch/nn/modules/module.py#L903 1

    if (_global_is_full_backward_hook is False):
        non_full_backward_hooks += _global_backward_hooks.values()
    if (self._is_full_backward_hook is False):
        non_full_backward_hooks += self._backward_hooks.values()

    return full_backward_hooks, non_full_backward_hooks

def _maybe_warn_non_full_backward_hook(self, inputs, result, grad_fn):
    if not isinstance(result, torch.Tensor):
        if not (isinstance(result, tuple) and all([isinstance(r, torch.Tensor) for r in result])):
            warnings.warn("Using non-full backward hooks on a Module that does not return a "
                          "single Tensor or a tuple of Tensors is deprecated and will be removed "
                          "in future versions. This hook will be missing some of the grad_output. "
                          "Please use register_full_backward_hook to get the documented behavior.")
            return
    else:
        result = (result,)

    if not isinstance(inputs, torch.Tensor):
        if not (isinstance(inputs, tuple) and all([isinstance(i, torch.Tensor) for i in inputs])):
            warnings.warn("Using non-full backward hooks on a Module that does not take as input a "