When having numpy arrays of single dimension, for example
X = np.array([0, 2, 1, 3, 5]) # shape (5, )
the keras adapter fails due to the _augment_hyperparameters function where we try to infer the shapes of the input and target variables. More specifically, the following lines can be edited
rather than assuming the data is at least contains two dimensions, i.e. shape = (m, n, ..) we can consume a shape of any size and cast it as uni-dimensional if we infer an empty tuple, more concretely the edited function would look like
Description
When having
numpy
arrays of single dimension, for examplethe
keras
adapter fails due to the_augment_hyperparameters
function where we try to infer the shapes of the input and target variables. More specifically, the following lines can be editedrather than assuming the data is at least contains two dimensions, i.e.
shape = (m, n, ..)
we can consume a shape of any size and cast it as uni-dimensional if we infer an empty tuple, more concretely the edited function would look likeThis issue was initially discovered in https://github.com/sintel-dev/GreenGuard/issues/59