using
for name, param in model.named_parameters():
    print(name, torch.isfinite(param.grad).all())

gives stacktrace
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-105-bd15723eb4e7> in <module>
     12 
     13 ptmzr.zero_grad()
---> 14 res = mod(imgs[0])
     15 lss = crtrn(res, imgs[0])
     16 lss.backward()

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
    725             result = self._slow_forward(*input, **kwargs)
    726         else:
--> 727             result = self.forward(*input, **kwargs)
    728         for hook in itertools.chain(
    729                 _global_forward_hooks.values(),

<ipython-input-103-cb1d63b32440> in forward(self, tensor)
     20             print(slc)
     21         for name, param in self.named_parameters():
---> 22             print(name, torch.isfinite(param.grad).all())
     23         tensor = self.fcn4(tensor)
     24         for name, param in self.named_parameters():

TypeError: isfinite(): argument 'input' (position 1) must be Tensor, not NoneType

So the output is none of the previous layer?