def project_weights(self): w = self.parameters['feature_to_in'] w /= ma.sqrt((w ** 2).sum(axis=0) + 1e-4)[np.newaxis]
def project_weights(self): w = self.parameters['feature_to_in'] w /= ma.sqrt((w**2).sum(axis=0) + 1e-4)[np.newaxis]
def project_weights(self): w = self.parameters['in_to_hidden'] w /= ma.sqrt((w**2).sum(axis=0) + 1e-4)[np.newaxis, :]
def project_weights(self): w = self.parameters['in_to_hidden'] w /= ma.sqrt((w ** 2).sum(axis=0) + 1e-4)[np.newaxis, :]