My apologies, I meant to include a description of the error:
line 101, in <lambda> h.register_hook(lambda x: x.clamp(min=-10, max=10))
AttributeError: 'NoneType' object has no attribute 'clamp'

It seems the tensor being passed to the lambda is None