Skip to content

Instantly share code, notes, and snippets.

@Lexie88rus
Created June 27, 2019 08:12
Show Gist options
  • Save Lexie88rus/dca81465892848f40d823a34ca5485a8 to your computer and use it in GitHub Desktop.
Save Lexie88rus/dca81465892848f40d823a34ca5485a8 to your computer and use it in GitHub Desktop.
Imports for custom activations
# Import basic libraries
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
from collections import OrderedDict
# Import PyTorch
import torch # import main library
from torch.autograd import Variable
import torch.nn as nn # import modules
from torch.autograd import Function # import Function to create custom activations
from torch.nn.parameter import Parameter # import Parameter to create custom activations with learnable parameters
from torch import optim # import optimizers for demonstrations
import torch.nn.functional as F # import torch functions
from torchvision import datasets, transforms # import transformations to use for demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment