Fixes pickling issue introduced by #736, causing two integration tests to fail on develop.
It is important that the feature-function is called with a tensor, instead of a parameter (which inducing points can be). This is to ensure pickling works correctly. First time a Keras layer (i.e. feature-functions) is built, the shape of the input is used to set the input-spec. If the input is a parameter, the input-spec will not be for an ordinary tensor and pickling will fail.
Note: the call here was not wrapped in tf.convert_to_tensor, since flat_x should already be a tensor.
Fixes pickling issue introduced by #736, causing two integration tests to fail on develop.
It is important that the feature-function is called with a tensor, instead of a parameter (which inducing points can be). This is to ensure pickling works correctly. First time a Keras layer (i.e. feature-functions) is built, the shape of the input is used to set the input-spec. If the input is a parameter, the input-spec will not be for an ordinary tensor and pickling will fail.
Note: the call here was not wrapped in
tf.convert_to_tensor
, sinceflat_x
should already be a tensor.