Error: Unsupported tensor DataType: DT_INT64, try to modify the model in python to convert the datatype
See original GitHub issueHello, I’m trying to convert this TFJS GraphModel:
tfconv.loadGraphModel(
'https://tfhub.dev/tensorflow/tfjs-model/toxicity/1/default/1',
{ fromTFHub: true })
The conversion works without any issues with the command tfjs_graph_converter --output_format tf_saved_model ./ ./saved/
But, when I try to load the saved model
tf.node.loadSavedModel(this.path)];
I get the error
(node:39361) UnhandledPromiseRejectionWarning: Error: Unsupported tensor DataType: DT_INT64, try to modify the model in python to convert the datatype
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Error when trying to fit the model Failed to convert a NumPy ...
Error when trying to fit the model Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray) ; type(feature_train)) ...
Read more >tf.data: Build TensorFlow input pipelines
The tf.data API enables you to build complex input pipelines from simple, reusable pieces. For example, the pipeline for an image model might...
Read more >torch.Tensor — PyTorch 1.13 documentation
Tensor is a multi-dimensional matrix containing elements of a single data type. Data types. Torch defines 10 tensor types with CPU and GPU...
Read more >ValueError: Failed to convert a NumPy array to a Tensor ...
As X_train and y_train are pandas.core.series.Series they can't be parsed. Try converting them to list as below: X=train[features].to_list() ...
Read more >Convert numpy array to tensor
The value can be a numpy array, python list and python scalars, for the following the function will return a tensor. Table of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@patlevin ah right!!
Perfect it works! Thank you! 🥇
@loretoparisi You need to use the compatibility flag:
The compatibility-mode is optional - the default behaviour is to keep all types as-is.