Can't update nn.dense.linear object inside nn.conv.nn_conv using .data #6556
-
Hi, I have a GNN model which has conv like this:
And I am trying to update this model by manually updating its fields as below: The first three works fine but the fourth one doesn't work, it is complained that Linear object doesn't have attributes data. Could I please have some helps on how I can update the model's conv1.lin? Thank you!!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
This is expected. Instead try |
Beta Was this translation helpful? Give feedback.
This is expected. Instead try
lin.weight.data
.