(self, x, y, kern, mean_function=gpflow.mean_functions.Zero(),
                 scale=1., name='GPRCached')
Initialize GP and cholesky decomposition.
Initialize GP and cholesky decomposition.
Initialize GP and cholesky decomposition .
def __init__(self, x, y, kern, mean_function=gpflow.mean_functions.Zero(),
                 scale=1., name='GPRCached'):
        """Initialize GP and cholesky decomposition."""
        # Make sure gpflow is imported
        if not isinstance(gpflow, ModuleType):
            raise gpflow

        # self.scope_name = scope.original_name_scope
        gpflow.gpr.GPR.__init__(self, x, y, kern, mean_function, name)

        # Create new dataholders for the cached data
        # TODO zero-dim dataholders cause strange allocator errors in
        # tensorflow with MKL
        dtype = config.np_dtype
        self.cholesky = gpflow.param.DataHolder(np.empty((0, 0), dtype=dtype),
                                                on_shape_change='pass')
        self.alpha = gpflow.param.DataHolder(np.empty((0, 0), dtype=dtype),
                                             on_shape_change='pass')
        self._scale = scale
        self.update_cache()
def __init__ ( self , x , y , kern , mean_function = gpflow . mean_functions . Zero ( ) , scale = 1. , name = 'GPRCached' ) : # Make sure gpflow is imported if not isinstance ( gpflow , ModuleType ) : raise gpflow # self.scope_name = scope.original_name_scope gpflow . gpr . GPR . __init__ ( self , x , y , kern , mean_function , name ) # Create new dataholders for the cached data # TODO zero-dim dataholders cause strange allocator errors in # tensorflow with MKL dtype = config . np_dtype self . cholesky = gpflow . param . DataHolder ( np . empty ( ( 0 , 0 ) , dtype = dtype ) , on_shape_change = 'pass' ) self . alpha = gpflow . param . DataHolder ( np . empty ( ( 0 , 0 ) , dtype = dtype ) , on_shape_change = 'pass' ) self . _scale = scale self . update_cache ( )