Hi, I am trying to reproduce the DCGAN tutorial code 35.
In the code, there is weights_init() method to initialize weights of model.

m.weight.data.normal_(0.0, 0.02)

As I know, in 0.4.0 the Variable is replaced by the Tensor.
So I delete the data cause its already Tensor.

m.weight.normal_(0.0, 0.02)

Then I got an error below.

RuntimeError: Leaf variable was used in an in-place operation

It seems like I still use Variable under Tensor.

Could anyone help to understand current relationship of Tensor and Variable?
Why m.weight.normal_(0.0, 0.02) without .data doesn’t work?

Thanks.