Skip to content
Discussion options

You must be logged in to vote

A hook is used to get intermediate output of some layer in your neural network, not to get the wieghts. To get the weights of lets say conv2 simply do

net = Net()
print(net.conv2.lin.weight, net.conv2.bias.weight)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@atale480
Comment options

@wsad1
Comment options

Answer selected by atale480
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