Skip to content

Instantly share code, notes, and snippets.

@shahules786
Created September 24, 2021 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shahules786/c60e1432e6d8b51d4176b244fba33781 to your computer and use it in GitHub Desktop.
Save shahules786/c60e1432e6d8b51d4176b244fba33781 to your computer and use it in GitHub Desktop.
def reintialize(model,num_layers):
"""reinitialize models weights untill num_layers starting from bottom layer"""
return model
model = DefinedModel()
model = reinitialize(model,2)
optimizer = Adam(1e-5)
dataloaders = get_train_valid_data()
train(model,optimizer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment