Last active
August 12, 2019 18:16
-
-
Save n0obcoder/4ffcdbbce2434574d88ef7cd875091f7 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
| for name, child in model.named_children(): | |
| print('name: ', name) | |
| print('isinstance({}, nn.Module): '.format(name), isinstance(child, nn.Module)) | |
| print('=====') |
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
| name: sequential | |
| isinstance(sequential, nn.Module): True | |
| ===== | |
| name: layer1 | |
| isinstance(layer1, nn.Module): True | |
| ===== | |
| name: layer2 | |
| isinstance(layer2, nn.Module): True | |
| ===== | |
| name: fc | |
| isinstance(fc, nn.Module): True | |
| ===== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment