Skip to content

Get weights and bias from the saved model #2402

Answered by laggui
wangjiawen2013 asked this question in Q&A

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: 5 comments 28 replies

You must be logged in to vote
0 replies
Answer selected by laggui

You must be logged in to vote
1 reply
@laggui

You must be logged in to vote
4 replies
@laggui

@wangjiawen2013

@laggui

@wangjiawen2013

You must be logged in to vote
21 replies
@laggui

@wangjiawen2013

@laggui

@wangjiawen2013

@laggui

You must be logged in to vote
2 replies
@laggui

@wangjiawen2013

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.