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 inspect | |
| import torch.nn as nn | |
| def get_default_args(func): | |
| signature = inspect.signature(func) | |
| return { | |
| k: v.default | |
| for k, v in signature.parameters.items() | |
| if v.default is not inspect.Parameter.empty |
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: ml | |
| channels: | |
| - pytorch | |
| - menpo | |
| - conda-forge | |
| - defaults | |
| dependencies: | |
| - python>=3.6 | |
| - jupyter | |
| - pylint |
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
| try: | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| except: | |
| from sys import exit | |
| print("Please make sure the following packages are installed:") | |
| print(" - numpy") | |
| print(" - matplotlib") | |
| exit(1) |