Comments (10)
I got it running by defining
def LRN2D(x):
import tensorflow as tf
return tf.nn.lrn(x, alpha=1e-4, beta=0.75)
in utils.py
i.e. did the tf
import inside the function. That's a workaround but I hope it's fine for you.
from face-recognition.
That's not an error but only a warning that the model was not compiled. If you only use the (converted) model for prediction you can ignore the warning.
from face-recognition.
Yes
from face-recognition.
Thanks, I did manage to avert that error, but I have got a new one up. I don't know if this is something you could help me with.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/bin/tflite_convert", line 11, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/contrib/lite/python/tflite_convert.py", line 412, in main
app.run(main=run_main, argv=sys.argv[:1])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/contrib/lite/python/tflite_convert.py", line 408, in run_main
_convert_model(tflite_flags)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/contrib/lite/python/tflite_convert.py", line 100, in _convert_model
converter = _get_toco_converter(flags)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/contrib/lite/python/tflite_convert.py", line 87, in _get_toco_converter
return converter_fn(**converter_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/contrib/lite/python/lite.py", line 368, in from_keras_model_file
keras_model = _keras.models.load_model(model_file)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/keras/engine/saving.py", line 219, in load_model
f = h5py.File(filepath, mode='r')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/h5py/_hl/files.py", line 394, in __init__
swmr=swmr)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/h5py/_hl/files.py", line 170, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 85, in h5py.h5f.open
OSError: Unable to open file (file signature not found)
Were you able to convert the .h5 into .tflite?
from face-recognition.
I tried tflite_convert --output_file test.tflite --keras_model_file test.h5
and it worked i.e. created the output file.
from face-recognition.
Okay, I did get a .tflite
file in the end, but did you encounter an error like this during the process:
WARNING:tensorflow:No training configuration found in save file: the model was *not* compiled. Compile it manually.
from face-recognition.
Oh ok. Did you encounter that?
from face-recognition.
Any objections to close this ticket?
from face-recognition.
NameError Traceback (most recent call last)
in
----> 1 detection_graph = tf.Graph()
2 with detection_graph.as_default():
3 od_graph_def = tf.GraphDef()
4 with tf.gfile.GFile(PATH_TO_FROZEN_GRAPH, 'rb') as fid:
5 serialized_graph = fid.read()
NNameError Traceback (most recent call last)
in
----> 1 detection_graph = tf.Graph()
2 with detection_graph.as_default():
3 od_graph_def = tf.GraphDef()
4 with tf.gfile.GFile(PATH_TO_FROZEN_GRAPH, 'rb') as fid:
5 serialized_graph = fid.read()
NameError: name 'tf' is not defined
from face-recognition.
(base) C:\Users\Administrator>python
Python 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
import tensorflow as tf
tf.version
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'tensorflow' has no attribute 'version'
from face-recognition.
Related Issues (20)
- probabilities of recognised person HOT 3
- Just need help on how you saved weights of nn4.small2.v1 in CSV HOT 2
- Use of LinearSVM HOT 5
- Embedding Vector HOT 1
- model saving and prediction on saved model
- IndexError: arrays used as indices must be of integer (or boolean) type
- Input tensors
- map embedding vector into image.
- multiple faces in image HOT 1
- How to load a model with only keras.model.load_model() method? HOT 7
- how to use
- Am getting below error while running notebook HOT 2
- Double counting pairs in distance threshold calculation HOT 1
- Model performance is not good on new data
- How to write triple'generator?
- I tried `tflite_convert --output_file test.tflite --keras_model_file test.h5` and it worked i.e. created the output file. HOT 2
- OSError: SavedModel file does not exist at: ./model/traffic_sign.model/{saved_model.pbtxt|saved_model.pb}
- Traceback (most recent call last)
- Load Dataset for Deep Learning 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 face-recognition.