Changing the dtype won’t break the computation graph as long as you are using floating point tensors.
However, this operation probablities__ = torch.argmax(probablities_, dim=2) will break it, as argmax is not differentiable. Casting the output back to .float() won’t restore the graph.