Last active
February 27, 2020 20:26
-
-
Save bilal2vec/6b00aeff6a3aa9f3ea62b3b26a358fca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Send a notification to your phone directly with IFTTT (https://ifttt.com/) notifying | |
# you when a training run ends or at the end of an epoch. | |
notify({'value1': 'Notification title', 'value2': 'Notification body'}, key=[IFTTT_KEY]) | |
# Automatically set random seeds for Python, numpy, and Pytorch to make sure your results can be reproduced | |
seed_envirionment(42) | |
# Print how much GPU memory is currently allocated | |
gpu_usage(device, digits=4) | |
# GPU Usage: 6.5 GB | |
# Print out the number of parameters in a Pytorch model | |
print(n_params(model)) | |
# 150909673 | |
# Save a model for a particular cross-validation fold to disk | |
save_model(model, fold=0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment