@jmaronas This is not a bug !
This is the intended behavior of .data. Here you have a given variable x_, when you do x_.data=, then you modify what x_ contains. It is an inplace change into x_.
@justusschock either .detach() or a with torch.no_grad() block depending on what what the .data used for. Yes that should done if you have someone has some free time