Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get the weights and biases of the trained neural network? #118

Open
gwiesenekker opened this issue Aug 31, 2023 · 2 comments
Open
Assignees
Labels
question Further information is requested

Comments

@gwiesenekker
Copy link

How can I get the weights and biases of the trained neural network?

@joaopauloschuler joaopauloschuler self-assigned this Sep 1, 2023
@joaopauloschuler joaopauloschuler added the question Further information is requested label Sep 1, 2023
@joaopauloschuler
Copy link
Owner

Each layer (TNNetLayer) has a list of Neurons:

property Neurons: TNNetNeuronList read FNeurons;

The neuron list is implemented as follows:

TNNetNeuronList = class (specialize TFPGObjectList<TNNetNeuron>)  

From TNNetNeuron, you have:

property Weights: TNNetVolume read FWeights;

So, regarding weights, you'll load from TNNetNeuron.Weights.

I'll FUP about bias.

@joaopauloschuler
Copy link
Owner

Just added support to read the bias in the most recent commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants