This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from scipy import linalg | |
| from sklearn.utils import array2d, as_float_array | |
| from sklearn.base import TransformerMixin, BaseEstimator | |
| class ZCA(BaseEstimator, TransformerMixin): | |
| def __init__(self, regularization=10**-5, copy=False): | |
| self.regularization = regularization |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Forward-backward algorithm implementation in Theano, | |
| #with example taken from Wikipedia: | |
| #http://en.wikipedia.org/wiki/Forward%E2%80%93backward_algorithm | |
| import theano | |
| import theano.tensor as T | |
| import numpy as np | |
| #Set up vectors, etc to represent | |
| #observations, indexes into the observation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from keras.models import Sequential | |
| from keras.layers.core import Permute | |
| from keras.layers.convolutional import Convolution2D | |
| from keras.layers.core import Activation | |
| import theano | |
| import theano.tensor as T | |
| import datetime | |
| import numpy as np | |
| now = datetime.datetime.now |
NewerOlder