-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
TensorFlow.js version
"@tensorflow/tfjs-node": "^1.5.1"
Browser version
NA
Describe the problem or feature request
When I load a saved model that is saved by tf.keras, Error: Unsupported tensor DataType: DT_INT64 error is thrown in node v10.15.0.
Code to reproduce the bug / link to feature request
https://colab.research.google.com/drive/13GNsRCVtiS3r-VcupZGC2aZo-gSueMEV#revisionId=0BwoZu2uBQcUZTUFQNDBIdURHaUJsR3VMK2c2OWhxZVg4LytzPQ saves the tf.keras model using model.save("saved_model/3_table_model")
and
const tf = require("@tensorflow/tfjs-node");
async function main() {
const modelInfo = await tf.node.getMetaGraphsFromSavedModel("./saved_model/3_table_model")
}
main();tries to load the meta graph.
And here is the stack trace from the run,
node-pre-gyp info This Node instance does not support builds for N-API version 4
node-pre-gyp info This Node instance does not support builds for N-API version 5
node-pre-gyp info This Node instance does not support builds for N-API version 4
node-pre-gyp info This Node instance does not support builds for N-API version 5
2020-01-24 23:17:13.039164: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-01-24 23:17:13.069065: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x109651400 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-01-24 23:17:13.069096: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
(node:16643) UnhandledPromiseRejectionWarning: Error: Unsupported tensor DataType: DT_INT64
at mapTFDtypeToJSDtype (<PROJECT_PATH>/node_modules/@tensorflow/tfjs-node/dist/saved_model.js:464:19)
at Object.<anonymous> (<PROJECT_PATH>/node_modules/@tensorflow/tfjs-node/dist/saved_model.js:162:57)
at step (<PROJECT_PATH>/node_modules/@tensorflow/tfjs-node/dist/saved_model.js:48:23)
at Object.next (<PROJECT_PATH>/node_modules/@tensorflow/tfjs-node/dist/saved_model.js:29:53)
at fulfilled (<PROJECT_PATH>/node_modules/@tensorflow/tfjs-node/dist/saved_model.js:20:58)
(node:16643) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16643) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I'm running this on a Mac OS 10.15.1 with Python 2.7.17 :: Anaconda, Inc.