As configured in my dotfiles.
start new:
tmux
start new with session name:
| # How to apply exponential moving average decay for variables? | |
| # https://discuss.pytorch.org/t/how-to-apply-exponential-moving-average-decay-for-variables/10856/2 | |
| class EMA(nn.Module): | |
| def __init__(self, mu): | |
| super(EMA, self).__init__() | |
| self.mu = mu | |
| def forward(self,x, last_average): | |
| new_average = self.mu*x + (1-self.mu)*last_average | |
| return new_average |
| import tensorflow as tf | |
| from tensorflow.examples.tutorials.mnist import input_data | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import matplotlib.gridspec as gridspec | |
| import os | |
| def xavier_init(size): | |
| in_dim = size[0] |
As configured in my dotfiles.
start new:
tmux
start new with session name: