Comments (2)
It's probably a bug in Keras. The option to convert to h5 was removed a long time ago, as there are many bugs related to loading h5.
$ python3
Python 3.8.10 (default, Sep 28 2021, 16:10:42)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> m = tf.saved_model.load('saved_model')
INFO:tensorflow:Saver not created because there are no variables in the graph to restore
2021-10-20 12:41:15.226458: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/intel/openvino_2021/data_processing/dl_streamer/lib:/opt/intel/openvino_2021/data_processing/gstreamer/lib:/opt/intel/openvino_2021/opencv/lib:/opt/intel/openvino_2021/deployment_tools/ngraph/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/tbb/lib::/opt/intel/openvino_2021/deployment_tools/inference_engine/external/hddl/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/omp/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/gna/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/mkltiny_lnx/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/lib/intel64:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
2021-10-20 12:41:15.226478: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2021-10-20 12:41:15.226496: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:163] no NVIDIA GPU device is present: /dev/nvidia0 does not exist
2021-10-20 12:41:15.226629: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: SSE3 SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-10-20 12:41:15.237417: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] None of the MLIR Optimization Passes are enabled (registered 2)
>>>
from tflite2tensorflow.
Got it. Thank you. Conversion to tensorflow works fine.
I hoped that it's possible to retrain this model from saved weights via keras.model.fit()
method.
from tflite2tensorflow.
Related Issues (20)
- Error converting face_landmark_with_attention.tflite HOT 2
- Error converting pose_detection.tflite [ No such file or directory: './pose_detection.json' ] HOT 2
- Error converting pose_detection.tflite [ No such file or directory: './pose_detection.json' ] HOT 3
- The shape of the output layer is different from the result of the tensorflow2onnx transformation. HOT 8
- Order of input channels switched on ONNX HOT 2
- Converted mediapipe palm detection coreml model cannot be deployed on IOS app HOT 7
- Add option to optimize tf.math.reduce_prod to Myriad (OAK) HOT 7
- Got error while converting magenta_arbitrary-image-stylization-v1-256_fp16_transfer_1.tflite to .h5 format HOT 1
- ValueError: The name 'serving_default_input_1:0:0' looks a like a Tensor name, but is not a valid one. Tensor names must be of the form "<op_name>:<output_index>". HOT 1
- CoreML conversions of face_landmark_with_attention.tflite fails HOT 3
- No json file HOT 1
- OSError: SavedModel file does not exist at: saved_model/{saved_model.pbtxt|saved_model.pb} HOT 1
- fail to convert [KNIFT] HOT 2
- Use docker but no *.json error HOT 6
- model quantified slower than not quantifed on windows x64 HOT 1
- tflite2tensorflow Docker has flatc error HOT 4
- Problem converting pose_landmark (full) HOT 1
- How to add custom operators to tflite runtime? HOT 1
- TypeError: Interpreter._get_tensor_details() missing 1 required positional argument: 'subgraph_index' HOT 3
- TypeError: Interpreter._get_tensor_details() missing 1 required positional argument: 'subgraph_index' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tflite2tensorflow.