Closed otcathatsya closed 1 year ago
Update; the KeyError was caused by me forgetting to clean the log directory. It does however still run into an Optimization loop failed: CANCELLED: Operation was cancelled
, giving a wrong accuracy of 100% no matter the model after the first simulation step. Data shape is (16, 14, 4)
for X and (16, 1)
on Y for time series forecasting.
As for the Optimization loop message: It is only a Warning, not an error, and concerns the optimization, which shouldn't matter at this point (the conversion assumes training is completed). Did you perhaps add a "fit" call somewhere? You should be able to get rid of the warning by either setting model.trainable = True
(source) or making sure your batch size (16) is not larger than your entire dataset, i.e. the 3 test samples specified in your config (source).
As for the accuracy, how do you know it is wrong? Is it possible that with only three test samples you just might have gotten lucky? Perhaps test on a larger number of samples. Also, you probably need to modify the accuracy calculation somehow. By default the toolbox assumes a classification task with one-hot labels, and I don't know if your time series forecasting works that way.
Using the development version, I encounter an issue when trying to convert a Conv1D network. From what I can tell all layers used are supported, but when using normalization, a
KeyError
is encountered:When normalization is instead turned off and x/y test are provided in normalized form it does proceed but ends up with with an optimization loop failure in backend:
The configuration file and model used are:
I experimented with normalization off as the input data is created using keras'
timeseries_dataset_from_array
after applying a scaler. When leaving it on scaling was moved after dataset creation for all input data butx_norm
.