When attempting to create the tensor so I can perform a prediction run, I receive the following error message:
Error: Error when checking : expected dense_3_input to have shape [null,9] but got array with shape [2,0].
Have tried variations of tf.tensor(), tensor1d(), tensor2d(), and creating various shapes, but still cannot determine why I'm not creating a [null, 9] shape, or if perhaps my original model is broken and needs to be modified & re-exported.
File:
poc/02_auto_mpg/src/App.js
Code Snippet
// prepare data into a "tensor"
// then run prediction
const tensor = tf.tensor2d([[], [cyl, disp, hp, weight, accel, year, data["USA"], data["Europe"], data["Japan"]]]);
const prediction = this.state.model.predict(tensor);
When attempting to create the tensor so I can perform a prediction run, I receive the following error message:
Error: Error when checking : expected dense_3_input to have shape [null,9] but got array with shape [2,0].
Have tried variations of tf.tensor(), tensor1d(), tensor2d(), and creating various shapes, but still cannot determine why I'm not creating a [null, 9] shape, or if perhaps my original model is broken and needs to be modified & re-exported.
File: poc/02_auto_mpg/src/App.js
Code Snippet