Skip to content

Instantly share code, notes, and snippets.

@thunderInfy
Created August 6, 2020 22:16
Show Gist options
  • Select an option

  • Save thunderInfy/48c6d851c6a8c002664be13078f5d517 to your computer and use it in GitHub Desktop.

Select an option

Save thunderInfy/48c6d851c6a8c002664be13078f5d517 to your computer and use it in GitHub Desktop.
# update resnetk
for θ_k, θ_q in zip(resnetk.parameters(), resnetq.parameters()):
θ_k.data.copy_(momentum*θ_k.data + θ_q.data*(1.0 - momentum))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment