I hereby claim:
- I am aeftimia on github.
- I am aeftimia (https://keybase.io/aeftimia) on keybase.
- I have a public key whose fingerprint is 4D49 0581 C078 51D8 61C6 5214 5B2B 8E5D 30B9 A0F2
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| Verifying my Blockstack ID is secured with the address 1JZXzQS1q1KJ1qVu5SWoHCi2RmeQxbgAwQ |
| import numpy | |
| import tensorflow | |
| from keras.constraints import Constraint | |
| from tensorflow.linalg import expm | |
| class Orthogonal(Constraint): | |
| """Orthogonal weight constraint. | |
| Constrains the weights incident to each hidden unit |
| import numpy | |
| import tensorflow | |
| from tensorflow.linalg import expm | |
| def orthogonalize(w, axis=None, orthonormal=False): | |
| """Orthogonal weight constraint. | |
| Constrains the weights incident to each hidden unit | |
| to be orthogonal when there are more inputs than hidden units. |
| import numpy | |
| from keras.datasets import cifar10 | |
| from sklearn import preprocessing | |
| from sklearn.tree import DecisionTreeClassifier | |
| (X_train, y_train), (X_test, y_test) = cifar10.load_data() | |
| X_train = X_train.astype('float32') | |
| X_test = X_test.astype('float32') |
| import numpy | |
| import scipy | |
| import scipy.spatial | |
| import scipy.optimize | |
| def constraint(alen, blen): | |
| return numpy.eye(alen)[..., numpy.newaxis] * numpy.ones(blen)[numpy.newaxis, numpy.newaxis] | |
| def emd(a, b, a_weights=None, b_weights=None): | |
| if a_weights is None: |