transforms = []
for transform in gpflow.transforms.Transform.__subclasses__():
if transform != gpflow.transforms.LowerTriangular:
transforms.append(transform())
else:
transforms.append(transform(4))
//self.transforms = [C() for C in gpflow.transforms.Transform.__subclasses__()]
After Change
x_np = np.random.randn(10).astype(settings.np_float)
transforms = []
for transform_class in gpflow.transforms.Transform.__subclasses__():
if transform_class == Chain:
continue // Chain transform cannot be tested on its own
if transform_class == gpflow.transforms.LowerTriangular:
transforms.append(transform_class(4))
else:
transform = transform_class()
transforms.append(transform)
transforms.append(Chain(Identity(), transform))
transforms.append(Chain(transform, Identity()))
//self.transforms = [C() for C in gpflow.transforms.Transform.__subclasses__()]
transforms.append(gpflow.transforms.Logistic(7.3, 19.4))
transforms.append(gpflow.transforms.positive(gpflow.transforms.Rescale(9.5))) // test __call__() and chaining