Unhandled promise rejection Error: "Constructing tensor of shape (800) should match the length of values (723)"
--
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+unsubscribe@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/b36c1497-9646-431c-b932-ade762d78133%40tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+unsubscribe@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/87f13f90-18ed-44e4-abe7-122da2ac8156%40tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+unsubscribe@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/54bea5cb-ecba-4000-b17e-ad51e1eed2a3%40tensorflow.org.
Could you show us some code / link us to the model?
import * as tf from '@tensorflow/tfjs';
import {loadFrozenModel} from '@tensorflow/tfjs-converter';
const MODEL_FILE_URL = 'https://dl.dropboxusercontent.com/s/n59dk9kkdnomu5b/tensorflowjs_model.pb';
const WEIGHT_MANIFEST_FILE_URL = 'https://dl.dropboxusercontent.com/s/n2tb8by6rr8mlyg/weights_manifest.json';
const model =(async () => {
await loadFrozenModel(MODEL_FILE_URL, WEIGHT_MANIFEST_FILE_URL) })();
def freeze_saved_model():
with tf.Session() as sess:
saver = tf.train.import_meta_graph(some_filepath + '.meta', clear_devices=True)
saver.restore(sess, some_model_folder_path)
graph = tf.get_default_graph()
input_graph_def = graph.as_graph_def()
output_node_names='output'
output_graph_def = tf.graph_util.convert_variables_to_constants(sess, input_graph_def, output_node_names.split(","))
output_graph = "NeuralNetwork/model/mnist-model.pb"
with tf.gfile.GFile(output_graph, "wb") as f:
f.write(output_graph_def.SerializeToString())
--
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+unsubscribe@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/6770617a-510e-43aa-92a4-96fd90dc96e0%40tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+uns...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
"Constructing tensor of shape (800) should match the length of values (210)"
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+uns...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
hmmm so I've finally gotten my tensorflow python model from mobilenet converted and loaded onto the browser
No more errors there . Removing all the babel and bundlers and using raw javascript now.
i followed your link at
https://github.com/tensorflow/tfjs/issues/292
and just downgraded to tensorflow-converter vers 0.2.0
no errors except when I do a model.predict(); here's the code.
error log says model.predict is not a function.
I did a console.log(model); and it's not empty so the model loads. Just don't know why I can't predict with it. So I checked the Object.prototype of model and I don't see a predict function. Any suggestions? thanks in advance.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+uns...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+unsubscribe@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/1220f904-73c9-4a3a-b8e8-257be02d2151%40tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/1220f904-73c9-4a3a-b8e8-257be02d2151%40tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/1220f904-73c9-4a3a-b8e8-257be02d2151%40tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+unsubscribe@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/1b5340b7-7bdf-45ce-9536-3122f0f17af7%40tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/1b5340b7-7bdf-45ce-9536-3122f0f17af7%40tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/1b5340b7-7bdf-45ce-9536-3122f0f17af7%40tensorflow.org.
So i set up a server to serve the files.
http://18.217.47.130/tensorflowjs_model.pb
http://18.217.47.130/weights_manifest.json
The pb is served as a binary now, and the error slightly changes!
So yeah, again, where do these values come from?
"Constructing tensor of shape (800) should match the length of values (210)"