- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is there any method to get the trained model parameters. For example, the weight dataset of each layers? Is that possible?
I do not want to train the model repeatedly.
Thanks a lot!!!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Hanxi,
There are several possibilities to get the parameters of the trained model:
- Directly from forward layers of neural network by using your_layer.input.get(layers::forward::weights) to get the weights for the forward layer as a Tensor and your_layer.input.get(layers::forward::biases) to get the biases respectively.
- From an instance of neural_networks::training::Model.
- To get weights and biases for the particular layer please use getWeightsAndBiases(layerId) method. It returns weights and biases for the layer packed into single numeric table.
- To get weights and biases for the whole network please use getWeightsAndBiases() method.
All the getters methods mentioned above have pair setters that are used for setting the pre-trained parameters to the model of neural network.
Please have a look at our neural_net_predict_dense_batch.cpp example to see how to perform neural networks prediction with the pre-trined parameters.
Best regards,
Victoriya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Victoriya!
That's what I need!
BTW, I've looked up the manual and find it a little bit hard to get all the member functions I need.Is there any easy way to get them?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please have a look at Developer Guide and Reference for Intel® DAAL. It contains the descriptions of all the Intel® DAAL classes and their members. For example, here is the description of neural_networks::training::Model class.
Best regards,
Victoriya
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page