Skip to content

Instantly share code, notes, and snippets.

Avatar
🇨🇦
Stygian Montreal Drift

Xa9aX ツ digantamisra98

🇨🇦
Stygian Montreal Drift
View GitHub Profile
View resnet.py
## Import Necessary Modules
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRateScheduler
from keras.callbacks import ReduceLROnPlateau
from keras.preprocessing.image import ImageDataGenerator
from keras.regularizers import l2
@digantamisra98
digantamisra98 / mish_keras.py
Created Aug 12, 2019
Mish Class Definition in Keras
View mish_keras.py
# Keras Implementation of Mish Activation Function.
# Import Necessary Modules.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from keras.engine.base_layer import Layer
from keras import backend as K
@digantamisra98
digantamisra98 / Mish_main.py
Created Aug 12, 2019
Basic PyTorch Sequential Model with Mish Activation Function
View Mish_main.py
# Import Necessary Modules
from mish import Mish
import torch
from torch import nn
from collections import OrderedDict
# Initialize the activation function
activation_function = Mish()
#Define the Torch Model using nn.sequential
View functional.py
'''
Script provides functional interface for Mish activation function.
'''
# import pytorch
import torch
import torch.nn.functional as F
def mish(input):
'''
View mish.py
'''
Applies the mish function element-wise:
mish(x) = x * tanh(softplus(x)) = x * tanh(ln(1 + exp(x)))
'''
# import pytorch
from torch import nn
# import activation functions
import functional as Func
@digantamisra98
digantamisra98 / Mish.pdf
Last active Aug 19, 2019
Mish Activation Function Poster
View Mish.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.