working mean function examples

This commit is contained in:
James Hensman 2015-03-26 08:48:56 +00:00
parent 254157ce04
commit cf0e29b207
4 changed files with 51 additions and 4 deletions

View file

@ -26,8 +26,8 @@ class Linear(Mapping):
def __init__(self, input_dim, output_dim, name='linmap'):
Mapping.__init__(self, input_dim=input_dim, output_dim=output_dim, name=name)
self.A = GPy.core.Param('A', np.random.randn(self.input_dim, self.output_dim))
self.add_parameter(self.A)
self.A = Param('A', np.random.randn(self.input_dim, self.output_dim))
self.link_parameter(self.A)
def f(self, X):
return np.dot(X, self.A)