lululxvi / deepxde

A library for scientific machine learning and physics-informed learning
https://deepxde.readthedocs.io
GNU Lesser General Public License v2.1
2.63k stars 739 forks source link

Setting Custom Initial Weights in a Neural Network #1771

Open saltinefarmer opened 3 months ago

saltinefarmer commented 3 months ago

Hello,

I am writing a basic neural network and I want to specify all the weights that each layer starts with. These weights will naturally change as the network trains, all I care about is how they start off. Is there a way to do this?

praksharma commented 2 months ago

yes you can but it a really bad idea. You have to manually created a class for weight and then add it to deepxde's source code. https://stackoverflow.com/q/66724071/14598633