Setting weights after initialization #1520
-
Hi,
This seems to have worked in previous versions of DJL, however as far as I can see this would cause issues in 0.15.0 since setArray() cannot be used after the parameter has been initialized:
I'm new to this and can't really see how to get around this issue. How do I set the weights of a net after it has been initialized? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@Applooza
The reason we block the |
Beta Was this translation helpful? Give feedback.
@Applooza
Instead of calling
setArray()
, you cangetArray()
and then copy the data into it:The reason we block the
setArray()
is assume the shape and data type should never change after initialized.