What about detaching the features from the kernel (keeping a reference to
avoid deletion), clone kernel and then Re-attaching them to the clone?
Also have you profiled the memory footprint of this? How long forbid the
double men necessary?
On 2 Mar 2014 21:31, "Roman Votyakov" <notifications@github.com> wrote:

> In src/shogun/machine/GaussianProcessMachine.cpp:
>
> > @@ -63,7 +63,10 @@ void CGaussianProcessMachine::init()
> >  		feat=m_method->get_features();
> >
> >  	// get kernel and compute kernel matrix: K(feat, data)*scale^2
> > -	CKernel* kernel=m_method->get_kernel();
> > +	CKernel* training_kernel=m_method->get_kernel();
> > +	CKernel* kernel=CKernel::obtain_from_generic(training_kernel->clone());
>
> I'm very open for discussion, but i still have no ideas how to avoid this.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/shogun-toolbox/shogun/pull/1922/files#r10197612>
> .
>