Thank you very much for answering? Indeed, I realised that some operations like:
binarized_output = torch.argmin(output, 1).type(dtype)
make binarized_output.grad_f,n equal to None.
As a consequence, I must find a way to perform those operations which are not differentiable right?