gpml backend error
aaronkerlin opened this issue · 1 comments
I get the following error when trying to run the MSGP-LSTM example (the GP-LSTM example runs fine):
Oct2PyError: Oct2Py tried to run:
"""
[dlik_dx ] = dlik(hyp, {@meanzero}, {@covGrid, {@covSEiso}, xg}, {@likGauss}, [], X_tr, y_tr);
"""
Octave returned:
error: binary operator '*' not implemented for 'sparse matrix' by 'float matrix' operations
error: called from
apx>@ at line 135 column 18
ldB2_grid>@ at line 221 column 35
apx>conjgrad at line 285 column 36
apx>linsolve at line 276 column 23
ldB2_grid>@ at line 222 column 21
infGaussLik at line 25 column 7
dlikGrid at line 36 column 11
@ at line 1 column 20
I'm running Octave 4.2.1 with the latest statistics package.
Apparently, it's the Octave limitation -- to work with sparse matrices, it relies on SuiteSparse routines which for some reason do not implement single precision operations between dense and sparse matrices. But, SuiteSparse implements these operations for the double precision.
Easy fix: in your ~/.keras/keras.json
change "floatx": "float32"
to "floatx": "float64"
.
Alternatively, we could convert all inputs to the GP layers to double precision before pushing them into the Octave session. This adds a data copy overhead. I'll consider adding this as an option for the Octave-based GP engine in the next release.