In [1]:
# As usual, a bit of setup
import numpy as np
import matplotlib.pyplot as plt
from skynet.solvers.classifier_trainer import ClassifierTrainer
from skynet.utils.gradient_check import eval_numerical_gradient
from skynet.neural_network.classifiers.convnet import *
%matplotlib inline
plt.rcParams['figure.figsize'] = (10.0, 8.0) # set default size of plots
plt.rcParams['image.interpolation'] = 'nearest'
plt.rcParams['image.cmap'] = 'gray'
# for auto-reloading external modules
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2
In [2]:
from skynet.neural_network.activation_statistics import activation_statistics
In [3]:
activation_statistics(init_func=lambda fan_in, fan_out: np.random.randn(fan_in, fan_out) * 0)
In [4]:
activation_statistics(
init_func=lambda fan_in, fan_out: np.random.randn(fan_in, fan_out) * 0.01)
In [5]:
activation_statistics(init_func=lambda fan_in, fan_out: np.random.randn(fan_in, fan_out) * 1)
In [6]:
activation_statistics(init_func=lambda fan_in, fan_out: np.random.randn(fan_in, fan_out) * 10)
In [7]:
activation_statistics(
init_func=lambda fan_in, fan_out: np.random.randn(fan_in, fan_out) * 2e-2)
In [8]:
activation_statistics(
init_func=lambda fan_in, fan_out: np.random.randn(fan_in, fan_out) * np.sqrt(2.0/fan_in))
In [9]:
activation_statistics(
init_func=lambda fan_in, fan_out: np.random.randn(fan_in, fan_out) * np.sqrt(1.0 / fan_in),
nonlinearity='relu')
In [10]:
activation_statistics(
init_func=lambda fan_in, fan_out: np.random.randn(fan_in, fan_out) * np.sqrt(2.0 / fan_in),
nonlinearity='relu')
In [ ]: