Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
58 views

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 ...
Sanjay Jithesh's user avatar
1 vote
1 answer
90 views

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 ...
Shinobu HUYUGIRI's user avatar
1 vote
0 answers
69 views

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 ...
Marcel's user avatar
  • 11
-2 votes
1 answer
34 views

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=...
kavindu shashen's user avatar
1 vote
4 answers
2k views

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 ...
ercan kurtoğlu's user avatar
6 votes
9 answers
10k views

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 ...
inter galactic's user avatar
0 votes
0 answers
229 views

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")...
WaldeModer's user avatar
3 votes
2 answers
2k views

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 ...
vmmgame's user avatar
  • 51
0 votes
2 answers
3k views

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 ...
user23483084's user avatar
1 vote
0 answers
42 views

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 ...
Steven Jones's user avatar
0 votes
1 answer
493 views

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-...
AndreaF's user avatar
  • 12.5k
0 votes
1 answer
593 views

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 ...
pj_qb's user avatar
  • 11
0 votes
1 answer
88 views

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 ...
martin Hm's user avatar
0 votes
1 answer
1k views

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 ...
Zor's user avatar
  • 1
0 votes
1 answer
177 views

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/...
DjoleDMonke's user avatar
0 votes
1 answer
368 views

In my code I wish to create a tokenizer from a pretrained TF Hub BERT module. Following is my code: sess = tf.compat.v1.Session() bert_path = "https://tfhub.dev/google/bert_uncased_L-12_H-768_A-...
inquisitiveForPython's user avatar
1 vote
0 answers
69 views

I tried to convert a model downloaded from tensorflow hub: faster_rcnn/openimages_v4/inception_resnet_v2 to TF Lite without success. This model interests me in particular because it has been trained ...
nelson mundaca's user avatar
-1 votes
2 answers
690 views

The text preprocessing models on the hub describe how to convert an input sentence, like "I am a boy", into token ids. But it does not show me how to convert those token ids back into words. ...
David S.'s user avatar
  • 11.2k
1 vote
1 answer
245 views

Recently installed tensorflow and tensorflow_hub in a miniconda environment and have an issue when trying to run a script. Receive the following error: Traceback (most recent call last): File "/...
BeginnersMindTruly's user avatar
0 votes
1 answer
852 views

I downloaded a model from tensorflow hub, and then tried to convert it into onnx using tf2onnx (https://github.com/onnx/tensorflow-onnx). However the model does not seem to work properly after ...
Montparg's user avatar
0 votes
1 answer
75 views

I defined a yamnet model of tensorflow 2 tensorflow_hub: yamnet_model = hub.load('https://tfhub.dev/google/yamnet/1') wav_data, sample_rate = librosa.load(wav_file_name, sr=16000) scores, spectogram =...
l12's user avatar
  • 111
1 vote
0 answers
163 views

I have successfully created a TF dataset using tf.data.Dataset.from_generator that reads several binary files in sequence and converts them to strings. The code looks like this: my_dataset = tf.data....
niefpaarschoenen's user avatar
0 votes
1 answer
56 views

I'm doing distillation with a teacher and student BERT model and exporting the student model with estimator.export_saved_model. This worked fine in TF1, but I moved to TF2 to be able to use multi-gpu ...
niefpaarschoenen's user avatar
0 votes
1 answer
127 views

I tried to download model from the url It showed error: URLError: <urlopen error [Errno 101] Network is unreachable> and solved this problem with How to load TF hub model from local system But ...
Jimmy Wang's user avatar
3 votes
2 answers
608 views

I'm trying to play with BERT in Google Colab and import tensorflow_hub as hub but it raising ValueError: The name 'tf.TrackableConstant' has already been registered to a serializable class. Found: &...
Denis Kuznetsov's user avatar
0 votes
1 answer
437 views

I'm trying to use the pre-trained BERT models on TensorFlow Hub to do some simple NLP. I'm on a 2021 MacBook Pro (Apple Silicon) with Python 3.9.13 and TensorFlow v2.9.2. However, preprocessing any ...
Joseph Yu's user avatar
0 votes
1 answer
553 views

I am trying to classify 10 species of birds on google colab using a pretrained model from tensorflow hub which has been trained on 964 species of birds. But when I train it, the accuracy isn't as high ...
adria's user avatar
  • 15
2 votes
1 answer
1k views

I have pyspark df like this: id desc 1 abd hdbh jbj 2 sgjhd jhdgh gjhg 3 bvj hvhgvgh 4 jkjb bhj Now I want to convert my desc column to vector so I'm using Google sentence ...
Chris_007's user avatar
  • 933
1 vote
2 answers
371 views

I'm passing a Numpy array, image, to 'process_image'. It is then processed, turned into a TensorSpec object with the dimensions and dtype required by the Tensorflow Hub model. def image_preprocessing(...
AxelOJD's user avatar
  • 17
0 votes
1 answer
246 views

I have used this code from the TensorFlow website: https://www.tensorflow.org/tutorials/images/transfer_learning_with_hub I have to implement the entire code without any problem, but I am wondering ...
Osama Mohammed's user avatar
0 votes
1 answer
857 views

I am working through a machine learning course to learn tensorflow. In one of the project I was performing text classification using a tensorflow_hub pre trained embedding, the Universal sentence ...
user3321208's user avatar
0 votes
1 answer
49 views

Code: import os path = "https://tfhub.dev/google/universal-sentence-encoder-multilingual/3" + "?tf-hub-format=compressed" os.environ["TFHUB_CACHE_DIR"] = '/...
madst's user avatar
  • 93
1 vote
0 answers
115 views

In the tensorflow documentation for TF-Agents Environments there is an example of an environment for a simple (blackjack inspired) card game. The __init__ looks like the following: class CardGameEnv(...
flowerboy's user avatar
  • 141
0 votes
1 answer
2k views

I am trying to load a model from Tensorflowhub using example code. It works perfect with the FP32. As soon as I add the tf.keras.mixed_precision.set_global_policy('mixed_float16') to enable mixed ...
learner's user avatar
  • 2,782
0 votes
1 answer
53 views

I have a project where I want to detect humans from images. I have implemented the code so that I use pre-trained TF Hub Models that are available at: https://github.com/tensorflow/models/blob/master/...
cangozpi's user avatar
  • 159
1 vote
0 answers
523 views

I would like to use the roberta-base model from tfhub. I am trying to run the example below, although I get an error when I try to feed sentences to model as input. I get the following error Invalid ...
Jane Sully's user avatar
  • 3,357
0 votes
1 answer
97 views

I am trying "chatbot.py" and I am getting below error. Traceback (most recent call last): File "chatbot.py", line 11, in embeddings = model(df["MESSAGE"].values)["...
chetan cc's user avatar
0 votes
1 answer
463 views

I am trying to use TensorFlow Hub in Azure ML Studio I am using the kernel Python 3.8 PT and TF And I installed a few modules: !pip install bert-for-tf2 !pip install sentencepiece !pip install "...
Luis Valencia's user avatar
0 votes
1 answer
357 views

code: model = create_model() model.compile(optimize=tf.keras.optimizers.Adam(learning_rate=2e-5), loss=tf.keras.losses.BinaryCrossentropy(), metrics=[tf.keras.metrics....
Sai teja Palachuri's user avatar
2 votes
1 answer
2k views

This should be a simple task: Download a model saved in tensorflow_hub format, load using tensorflow_hub, and use.. This is the model I am trying to use (simCLR stored in Google Cloud): https://...
hirschme's user avatar
  • 914
0 votes
1 answer
1k views

I am currently working on audio classification task and using Yamnet which is a pretrained model from tfhub.. I am using it to extract embeddings from audios and then i use another simple ...
khaoula benali's user avatar
0 votes
0 answers
3k views

I'm trying to download a style transfer model, and I want to get style bottlenecks from a bunch of images. Here's the code, which I sourced from this site. style_predict_path = tf.keras.utils.get_file(...
Xhatahx's user avatar
2 votes
1 answer
353 views

I am just learning image classification with TensorFlow and found that there is a TensorFlow hub where we can use a lot of models for a lot of classification tasks. For example, I want to build food ...
Hermawan Wiwid's user avatar
0 votes
1 answer
238 views

I have downloaded and am using a tensorflow hub model. The model creation code is: model_url = "https://tfhub.dev/google/imagenet/mobilenet_v3_large_075_224/feature_vector/5" # "https:/...
Ian Newson's user avatar
  • 7,967
0 votes
1 answer
162 views

I'm trying to train a multiclass image classification model, based on this model: https://tfhub.dev/google/imagenet/inception_v3/feature_vector/5 And taking some code from here: https://colab.research....
Ian Newson's user avatar
  • 7,967
0 votes
1 answer
613 views

I am using the following code to generate embeddings for my text classification. import tensorflow as tf import tensorflow_hub as hub import tensorflow_text as text bert_preprocess =hub.KerasLayer(&...
Para's user avatar
  • 1
0 votes
1 answer
116 views

So I am involved in a project that involves feeding a combination of text embeddings and image vectors into a DNN to arrive at the result. Now for the word embedding part, I am using TFHUB's Electra ...
Prabhav Singh's user avatar
0 votes
1 answer
641 views

I have built an android ML image classification app using the starter model from Tensorflow.org/lite. The starter model includes the .TFLite model and also an accompanying label.txt file. I now want ...
david sutton's user avatar
0 votes
1 answer
146 views

Currently I try to code my own loss function, but when returning the result (a tensor that consists of a list with the loss values) I get the following error: ValueError: No gradients provided for any ...
vazun's user avatar
  • 234
2 votes
1 answer
849 views

Tried to save a Keras model by following the TensorFlow tutorial. from tensorflow.keras.layers import Dense, Input from tensorflow.keras.models import Model import tensorflow_hub as hub import ...
E.K.'s user avatar
  • 4,379

1
2 3 4 5
7