Created
April 2, 2020 21:12
-
-
Save shashankprasanna/f5206654754735f176111350dcd81acc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import smdebug.pytorch as smd | |
net = get_network() | |
criterion = nn.CrossEntropyLoss() | |
optimizer = optim.SGD(net.parameters(), lr=0.001, momentum=0.9) | |
job_name = 'pytorch-debug-job' | |
hook = smd.Hook(out_dir=f'./smd_outputs/{job_name}', | |
save_config=smd.SaveConfig(save_interval=10), | |
include_collections=['gradients', 'biases']) | |
hook.register_module(net) | |
hook.register_loss(criterion) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment