Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save n0obcoder/56c95c0444f3f3ed549321ab43e0845a to your computer and use it in GitHub Desktop.

Select an option

Save n0obcoder/56c95c0444f3f3ed549321ab43e0845a to your computer and use it in GitHub Desktop.
# Let's see what are the learnt parameters after having trained the model for hundreds of epochs
m_learnt = model.linear.weight.item()
c_learnt = model.linear.bias.item()
print('\nCompare the learnt parameters with the original ones')
print('\nm_synthetic VS m_learnt')
print(' {} {}'.format(m_synthetic, m_learnt))
print('\nc_synthetic VS c_learnt')
print(' {} {}'.format(c_synthetic, c_learnt))
Compare the learnt parameters with the original ones
m_synthetic VS m_learnt
-0.67 -0.6612429618835449
c_synthetic VS c_learnt
6 0.3956650197505951
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment