Hello everyone!
This is my first post here.
I have been trying to initialize bias data to a specific vector but have not found a way to do so without creating a leaf variable. I am coding in C++.
In the layer “affine2”, I can initialize the entries as follows:
affine2->bias[0] = 0.1;
affine2->bias[1] = 0.2;
affine2->bias[2] = 0.3;
However, later on, when trying to do backpropagation , this leads to the error “leaf variable has been moved into the graph interior”.
Does anyone know how to do exactly what I displayed without introducing leaf variables?
Thank you for your time.