autonomio / talos

Hyperparameter Experiments with TensorFlow and Keras
https://autonom.io
MIT License
1.62k stars 268 forks source link

ValueError: Input 0 is incompatible with layer lstm_54: expected ndim=3, found ndim=2 #479

Closed PietroAmin closed 4 years ago

PietroAmin commented 4 years ago

First off, make sure to check your support options.

The preferred way to resolve usage related matters is through the docs which are maintained up-to-date with the latest version of Talos.

If you do end up asking for support in a new issue, make sure to follow the below steps carefully.

1) Confirm the below

2) Include the output of:

talos.__version__: 0.6.6

3) Explain clearly what you are trying to achieve

Capture

ww

4) Explain what you have already tried

I simply have no idea why this error is popping up as if the model is trained without scan it works fine.

5) Provide a code-complete reference

NOTE: If the data is sensitive and can't be shared, create dummy data that mimics it.

A self-contained Jupyter Notebook, Google Colab, or similar is highly preferred and will speed up helping you with your issue.


github-actions[bot] commented 4 years ago

Welcome to Talos community! Thanks so much for creating your first issue :)

mattou78400 commented 4 years ago

Hi,

How was the issue fixed? I'm having the same kind of issue with predictig after a scan: scan_object = talos.autom8.AutoScan(task='continuous', max_param_values=3, experiment_name='testing.new') scan_object = scan_object.start(x=x_train, y=self.train_y, x_val = x_val, y_val = self.test_y, round_limit=2, fraction_limit=0.00001) talos.Deploy(scan_object=scan_object, model_name='deploy', metric='mae') [...] loaded_model = talos.Restore('deploy.zip') self.pred = loaded_model .model.predict(x_val) it then throws : Input 0 of layer sequential is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: [None, 393]

When the pred Xs are the same as the training_val Xs.