Skip to content

Get weights and bias from the saved model #2402

Answered by laggui
wangjiawen2013 asked this question in Q&A
Discussion options

You must be logged in to vote

The parameters for each module are accessible via their respective field. For example, you can get the Linear weight and bias tensor values with:

let weight = linear.weight.val();
let bias = linear.bias.unwrap().val();

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by laggui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2400 on October 22, 2024 11:56.