322 questions
3
votes
1
answer
152
views
How to fix ValueError: Only instances of keras.Layer can be added to a Sequential model when adding tensorflow_hub.KerasLayer?
I am learning TensorFlow and transfer learning, and I am trying to add a TensorFlow Hub feature extractor to a Keras Sequential model. But I get this error:
ValueError: Only instances of keras.Layer ...
1
vote
1
answer
103
views
How can I save a model with input shape (1, None, None, 3) with None fixed to 256?
I have questions about a model obtained from TensorFlow Hub.
I am trying to use "movenet" with the following source code.
https://www.kaggle.com/models/google/movenet/tensorFlow2
(1) The ...
1
vote
0
answers
75
views
I cannot transfer learning YAMNET for multi-label problem
I'm using this tutorial to apply transfer learning to my dataset which has 32 classes of audio.
https://www.tensorflow.org/tutorials/audio/transfer_learning_audio?hl=en
But this does not seem to work ...
-2
votes
1
answer
38
views
About tensorflow_hub
hi guys i'm successfully import tensorflow_hub.
but when I trey to run this code part
"
**IMAGE_SHAPE = (224, 224)
classifier = tf.keras.Sequential([
hub.KerasLayer(classifier_model, input_shape=...
1
vote
4
answers
2k
views
Only instances of `keras.Layer` can be added to a Sequential model
I encountered an error related to Sequential while working with TensorFlow Hub. Can anyone help me with this?"
enter image description here
"ValueError: Only instances of keras.Layer can be ...
6
votes
9
answers
10k
views
error : Only instances of `keras.Layer` can be added to a Sequential model
I simply want to wrap the model as a keras layer but it simply is not happening ans keeps showing this error to me, i don't know if it's the keras or tensorflow version but i don't want to change them ...
0
votes
0
answers
231
views
Tensorflow Hub: AttributeError: module 'tensorflow_hub' has no attribute 'load'
Got this error message. Used Pycharm IDE for Python.
This is the code I had used:
import tensorflow_hub as hub
embed = hub.load("https://tfhub.dev/google/universal-sentence-encoder-large/5")...
4
votes
2
answers
2k
views
Issue with BERT Preprocessor model in TF2 and python
I am trying to use BERT to do a text classification project. However I keep running into this error
`
ValueError Traceback (most recent call last)
Cell In[37], line 4
...
0
votes
2
answers
3k
views
Module 'tensorflow_hub' has no attribute 'Module'
I used Jupyter Notebook to do ELMo to extract features.
However, when I am trying to run the code
!pip install tensorflow
!pip install tensorflow-hub
import tensorflow_hub as hub
import tensorflow as ...
1
vote
0
answers
49
views
TensorFlow_Hub saved model online accessibility?
I've followed the TensorFlow_Hub documentation to retrain one of their models to identify one of 20 cat breeds from an image. I'm doing this for school, and part of it requires me making it available ...
0
votes
1
answer
511
views
TensorFlow saved_model.pb cannot be loaded correctly
I have downloaded a model from Hub. The archive contains TensorFlow 2 saved model and if decompressed shows a file named saved_model.pb and a variables folder that inside has 2 files variables.data-...
0
votes
1
answer
625
views
Why is Tensorflow Hub giving 403 Error suddenly?
Created a project almost a year ago that uses TensorFlow models. All has been working fine up until this morning. Suddenly our application has started getting errors to fetch models at the following ...
0
votes
1
answer
94
views
tensorflow hub in flutter_android
I want to use the model food_V1, https://tfhub.dev/google/aiy/vision/classifier/food_V1/1 in Flutter, but when I download the model, there is no labels.txt file. There is only one tflite file and I ...
0
votes
1
answer
1k
views
Tensorflow-Hub Modules not loading
I am trying to use the universal sentence encoder 4, It works on my desktop at home but I am not home so I am having to re-set everything up. I am using this all in a virtual environment. I have ...
0
votes
1
answer
180
views
miniconda3 -> Jupyter -> tensorflow-hub -> [SSL: CERTIFICATE_VERIFY_FAILED]
When I try to load a model from tensorflow hub like:
INPUT_SHAPE = [None, IMG_SIZE, IMG_SIZE, 3]
OUTPUT_SHAPE = len(unique_labels)
MODEL_URL = "https://tfhub.dev/google/imagenet/...