Skip to content

Instantly share code, notes, and snippets.

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
name: ml
channels:
- pytorch
- menpo
- conda-forge
- defaults
dependencies:
- python>=3.6
- jupyter
- pylint
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)