You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import tensorflowjs as tfjs
tfjs.converters.save_keras_model(model, "./js")
but when i load with
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.1.2/dist/tf.min.js"></script>
<script type="text/javascript">
const model = await tf.loadLayersModel('model/model.json');
</script>
I get this error
Uncaught (in promise) Error: Input 0 is incompatible with layer flatten_1: expected min_ndim=3, found ndim=2. Error: Input 0 is incompatible with layer flatten_1: expected min_ndim=3, found ndim=2.
at new e (errors.ts:48)
at e.assertInputCompatibility (topology.ts:789)
at topology.ts:984
at Yp (common.ts:43)
at e.apply (topology.ts:977)
at e.add (models.ts:499)
at e.fromConfig (models.ts:1020)
at Cp (generic_utils.ts:277)
at ud (serialization.ts:31)
at models.ts:299
e @ errors.ts:48
e.assertInputCompatibility @ topology.ts:789
(anonymous) @ topology.ts:984
Yp @ common.ts:43
e.apply @ topology.ts:977
e.add @ models.ts:499
e.fromConfig @ models.ts:1020
Cp @ generic_utils.ts:277
ud @ serialization.ts:31
(anonymous) @ models.ts:299
(anonymous) @ common.ts:14
(anonymous) @ common.ts:14
o @ common.ts:14
errors.ts:48 Uncaught (in promise) Error: Input 0 is incompatible with layer flatten_1: expected min_ndim=3, found ndim=2.
at new e (errors.ts:48)
at e.assertInputCompatibility (topology.ts:789)
at topology.ts:984
at Yp (common.ts:43)
at e.apply (topology.ts:977)
at e.add (models.ts:499)
at e.fromConfig (models.ts:1020)
at Cp (generic_utils.ts:277)
at ud (serialization.ts:31)
at models.ts:299
e @ errors.ts:48
e.assertInputCompatibility @ topology.ts:789
(anonymous) @ topology.ts:984
Yp @ common.ts:43
e.apply @ topology.ts:977
e.add @ models.ts:499
e.fromConfig @ models.ts:1020
Cp @ generic_utils.ts:277
ud @ serialization.ts:31
(anonymous) @ models.ts:299
(anonymous) @ common.ts:14
(anonymous) @ common.ts:14
o @ common.ts:14
Code to reproduce the bug / link to feature request
The text was updated successfully, but these errors were encountered:
Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!
TensorFlow.js version
1.1.2
Browser version
Chrome 75.0.3770.100 (Official Build) (64-bit)
Tensorflow
Tensorflow 2.0 Beta
Describe the problem or feature request
I export my trained model (Work great with Tensorflow 2.0 and Keras)
with
but when i load with
I get this error
Code to reproduce the bug / link to feature request
The text was updated successfully, but these errors were encountered: