Questions tagged [tensorflow]

TensorFlow is an open-source library and API designed for deep learning, written and maintained by Google. Use this tag with a language-specific tag ([python], [c++], [javascript], [r], etc.) for questions about using the API to solve machine learning problems. The programming languages that can be used with TensorFlow API vary, so you must specify the programming language. Please specify the application area such as [object-detection] as well.

tensorflow
Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Saving subclassed model in Keras

I want to save my model for deployment and it sounds like it's not possible for subclassed model. what do you recommend me to do? batch = next(iter(val_ds)) idx_to_char = vectorizer.get_vocabulary()...
0 votes
0 answers
41 views
+50

Loss returned by .fit() not equivalent to loss printed by verbose (Tensorflow)

I am trying to train a Tensorflow Recommenders model and I was surprised to see, that the training loss returned by the fit() method does not match the ones printed by it while training (see picture). ...
0 votes
0 answers
7 views

How do I convert a tflite action recognition model to a coreml model using coremltools convert?

I have a tflite model stored in a variable tflite_model. I used transfer learning to train the action recognition model MoViNet on a custom dataset, and I'd like to use this model in an Xcode project. ...
22 votes
3 answers
6k views

Difference between model(x) and model.predict(x) in Keras?

What is the difference between using model(x) and model.predict(x) for predicting the outcome of a model in Keras?
0 votes
0 answers
7 views

Tensorflow Data Arrangement and Model Selection/Type Question

Good Afternoon, First off, I am very new to the machine learning world, so I am going to apologize in advance if I am not even asking the question correctly and while I did not find what I was looking ...
0 votes
0 answers
14 views

Cannot Install Tensorflow in Anaconda Prompt

when I try to install tensorflow it gives me the message below. My OS is windows 11. Please help me. Thank you. (py3-TF2.0) C:\Windows\System32>conda install tensorflow Channels: defaults ...
-3 votes
0 answers
48 views

i am working on my project how to detect deepfake images

i have taken the dataset from kaggle, i am at beginner level. can anyone of help me with these errors, i am running the program in google colab at a point i am stuck with this code also tf.test....
0 votes
0 answers
18 views

Installing @tensorflow/tfjs-node but receiving error "No backend found in registry"

I try to install @tensorflow/tfjs-node but receive this error I have installed python and path to it. I have installed: "@tensorflow/tfjs": "^4.18.0", "@tensorflow/tfjs-...
392 votes
26 answers
978k views

Could not find a version that satisfies the requirement tensorflow

I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules in PyCharm (Numpy, Pandas, etc), but when I tried installing ...
0 votes
0 answers
4 views

Using Additional Ground Truth For Custom Loss Function Only in Keras Functional API LSTM

I currently have a simple LSTM model built using Keras Functional API that takes an X_train dataset to predict associated Y_train data. I've built a custom loss function that can use y_pred and y_true ...
0 votes
0 answers
5 views

Error with MeanAbsolutePercentageError() in tensorflow model with AdamW algorithm

I was trying to find the optimum number of nodes for 2 hidden layers in an artificial neural network. I wanted to use MeanAbsolutePercentageError to evaluate the accuracy of my model. This is the ...
1 vote
1 answer
15 views

Keras in R - full list of metrics using compile()

I am using Keras in RStudio for binary image classification, but am having trouble trying to access the full list of in-built metrics available in the package when compiling my model. I know that ...
9 votes
6 answers
4k views

AssertionError: Tried to export a function which references untracked resource

I wrote a unit-test in order to safe a model after noticing that I am not able to do so (anymore) during training. @pytest.mark.usefixtures("maybe_run_functions_eagerly") def test_save_model(...
0 votes
0 answers
6 views

UserWarning: Your input ran out of data; interrupting training when training VGG-16 in jupyternotebook

When i train my vgg16 model in jupyter notebook in even epoch th training interuppted because ran ot of data the error UserWarning: Your input ran out of data; interrupting training. Make sure that ...
0 votes
1 answer
475 views

tf.gradients() returns a list of [None]

I am trying to build a generative model that outputs probabilities for each tracked day of COVID to input into an SEIR-based epidemiology model. The generation works. However, I cannot figure out how ...
1 vote
1 answer
24 views

Using different backbone network in keras gets error

I am using several backbone network for transfer learning. However, I got an error as below. The name "conv2_block1_1_conv" is used 2 times in the model. All layer names should be unique. ...
0 votes
0 answers
13 views

Combine feature extractor with sequence model in Tensorflow

I am following video classification tutorial using transformers from keras tutorials here. I am failing to merge the pretrained feature extractor and the transformer layers into a single model (why I'...
3 votes
2 answers
5k views

ImportError: cannot import name 'ImageDataGenerator' from 'keras.preprocessing.image'

ImportError: cannot import name 'ImageDataGenerator' from 'keras.preprocessing.image' (/opt/conda/lib/python3.10/site-packages/keras/preprocessing/image/init.py) Occurred when running in Kaggle. The ...
0 votes
0 answers
15 views

How to reduce my Tensorflow docker image?

I have a Dash app running fine locally. The app uses tensorflow and ultralytics to detect some events on a graph using yolo8. I am trying to deploy this app to a server inside a docker container. The ...
7 votes
2 answers
25k views

How to fix "The TensorFlow library was compiled to use AVX512F instructions, but these aren't available on your machine."

I have installed tensorflow 1.12. The platform is: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz 1080Ti Ubuntu 16.04 Anaconda python 3.5 The tensorflow itself is ok. But when I run tensorboard, I get the ...
0 votes
1 answer
24 views

Installing Tensorflow (building pip package)

I'm tring to install tensorflow 2.6.0 on WSL2. I follow the guide (https://www.tensorflow.org/install/source?hl=pl) and after: bazel build //tensorflow/tools/pip_package:wheel --repo_env=WHEEL_NAME=...
0 votes
0 answers
15 views

UnimplementedError tensorflow.python.framework.errors_impl.UnimplementedError: Graph execution error when try to predict using deep learning model

I have trained my deep learning model and saved it with the name "try_model_in_out.h5", then I want to try to create a website that can receive input and use the model I have trained to ...
6 votes
1 answer
8k views

Get warning : You should probably TRAIN this model on a downstream task to be able to use it for predictions and inference. when loadin finetune model

I get this message when loading a finetune model of Bert with a forward neural netword on the last layer from a checkpoint directory. This IS expected if you are initializing ...
0 votes
1 answer
13 views

Keras-rl2 error Compability with Tensorflow

I'm Currently Facing a problem when it comes to use the keras-rl2 with tensorflow and i dont know why, I just search on the internet and the keras-rl2, tensorflow, and keras documentation and didn't ...
0 votes
0 answers
21 views

How deep learning model's accuracy can calculate with different shape of prediction output and real target data?

please refer to https://keras.io/examples/vision/deeplabv3_plus/. Here, mask shape is (512, 512, 1). However, model output shape is (None, 512, 512, 20). Performance metric is 'accuracy'. I can't ...
0 votes
0 answers
5 views

INVALID_ARGUMENT: required broadcastable shapes: this error occurs when I change the batch size of a encoder-decoder using LSTM

I am doing a task of time series prediction using Encoder-Decoder. This is my model: # -*- coding: utf-8 -*- """ Created on Tue Apr 9 23:59:31 2024 @author: ASUS """ ...
1 vote
1 answer
20 views

pyGad RAM usage

I am using pygad for a neural network and I am wondering why its using RAM after each generation? The issue is that I leave it to run and then as it starts to use more and more RAM, then RAM usage ...
0 votes
1 answer
40 views

Tensorflow binary crossentropy always predicts the same value

I'm new to the general stack overflow community and especially new to the Tensorflow library (1 week as of now). So I'm positive I am missing something here, just can't quite figure it out myself. I ...
-2 votes
0 answers
22 views

Is there a reason why TensorFlow/Keras don't support K-folding?

Just to be clear: I'm not asking for the "political" reasons as to why the developers at TensorFlow haven't chosen to include K-folding in, say, the .fit function. Rather, I'm asking if ...
0 votes
0 answers
17 views

Tensorflow Keras saved model does not contain correct input names

We are using tensorflow 2.12 for training a prediction model and serving via Tensorflow-Serving REST API for prediction. The training works fine and we have a ServingModel as follows inp = { ...
0 votes
0 answers
17 views

Tensorflow map_fn do not pass variable to lambda function

I am trying to code BERT model, with 15% token masked. To create mask token, I first create a tensor with actual length (85% first token is 1, the other is 0) with sequence_mask. Then I shuffle it, ...
0 votes
0 answers
12 views

How to troubleshoot the model_from_json error?

Hi guys I was coding a project (a small portion of my project is the following code). The issue I was facing is that it seems that model_from_json is not properly reading the json file. I have keras ...
0 votes
0 answers
7 views

How to solve the shap_values for GradientExplainer using TensorFlow?

I am running a Shipping Companies top 5 prediction, based on different inputs, everything runs beside the shap_values = explainer.shap_values(model.inputs, model.output) (GradientExplainer) # Assemble ...
1 vote
1 answer
4k views

How does Tensorflow know cuda version?

I have an old desktop that I'm trying to use Tensorflow on after a hiatus. I uninstalled previous versions of Cuda and installed 11.3. When I try to use Tensorflow and check the Cuda package versions, ...
0 votes
1 answer
28 views

Jupyter Notebook doesn't detect GPU while importing tensorflow

In jupyter notebook I am importing tensorflow for my project . It is better if the training does work on gpu so I tried running !pip3 install --upgrade tensorflow command but I got the error as ...
0 votes
1 answer
32 views

errror when I run locally this colab python code

I have this code from this colab https://colab.research.google.com/github/google/eng-edu/blob/main/ml/cc/exercises/representation_with_a_feature_cross.ipynb #@title Load the imports import numpy as ...
0 votes
0 answers
23 views

Can't load keras model (.hdf5)

I have trained a model in kaggle with Keras: 3.0.5 Tensorflow: 2.15.0 I checked that these 2 have dependacy conflict, but in kaggle notebook I got these 2 versions pre-installed and I have trained ...
0 votes
0 answers
13 views

Issues with saving and loading a model using tensorflow

I created a simple cnn model that uses mobilenet as a pretrained model. After training I want to save the model for later use but I am unable to save it in HDF5 format. After saving it in keras unable ...
0 votes
0 answers
86 views

Trying to use keras pipeline: Unrecognized keyword arguments passed to Dense:

I installed keras-ocr from pip and am running this: import keras_ocr I get this error here but I've read I can just ignore it: 2024-04-07 01:32:55.323689: I tensorflow/core/platform/cpu_feature_guard....
1 vote
0 answers
19 views

Why GAN discriminator results are so different if real and fake images are in the same batch or not?

I'm training a GAN to generate small images and I wanted to incorporate the minibatch stdev improvement to avoid that all generated images by generator tend to be the same. The implementation of ...
-1 votes
0 answers
171 views

Tensorflow's quantization for RNN and LSTM [closed]

In the guide for Quantization Aware Training, I noticed that RNN and LSTM were listed in the roadmap for "future support". Does anyone know if it is supported now? Is using Post-Training ...
0 votes
2 answers
66 views
+50

ImportError: cannot import name 'model_from_config' from 'tensorflow.keras.models' for Mac M1

Trying to run a gym environment with RL agent on Mac M1. import gym import numpy as np from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Flatten from ...
0 votes
0 answers
15 views

TensorFlow Image Recognising Model Not Working Properly

So I watched a YouTube Video where a guy says the best way to learn AI is to reverse engineer the source code. So I downloaded an image dataset of cats and dogs from Kaggle and asked ChatGPT to ...
-1 votes
0 answers
18 views

Isolation Forest vs Autoencoder vs ADTK Lib [closed]

I have a project where I have do anomaly detection for stock market data of various companies take the dataset as yahoo finance. Which anomaly detection method would be the best Isolation Forest, ...
0 votes
0 answers
22 views

Problem with dimensions before max_pooling2d while using a u-net created with tensorflow

I have a u-net architecture coded with tensorflow : def down_block(x, filters, kernel_size=(3, 3), padding='same', strides=1): x = tf.keras.layers.Conv2D(filters, kernel_size, padding=padding, ...
0 votes
0 answers
14 views

Error dumping weights duplicate weight name kernel (tensorflow keras to tensorflowJS export)

I'm having problems to export a simple tensorflow model to a tensorflowjs model, currently I have read the official documentation about recomendations and found the next: ERROR OUTPUT failed to ...
1 vote
2 answers
782 views

Keras Network Using Scikit-Learn Pipeline Resulting in ValueError

I'm working to build a neural network using Keras and the Scikit-Learn Pipeline for pre-processing. So far, I was able to build the pipeline and initial model architecture (very basic), but have had ...
1 vote
0 answers
22 views

Different results when only test dataset is loaded using `keras.utils.image_dataset_from_directory`

I used the following lines to fetch my test dataset: test_ds = keras.utils.image_dataset_from_directory(img_path, image_size=image_size, batch_size = batch_size) When I run my model on this, I get ...
0 votes
1 answer
52 views

AttributeError: 'Sequential' object has no attribute 'fit_generator'

**This is my current code : ** from keras.models import Sequential from keras.layers import Convolution2D from keras.layers import MaxPooling2D from keras.layers import Dense from ...
-1 votes
1 answer
36 views

Model Accuracy Jumps to 1.0000 After First Epoch Completion

As I said in title when I start training my model. It accuracy jumps directly to 1 after completion of 1st epoch and model loss stuck at 2 point something. I am using a text retrieval model but there ...

1
2 3 4 5
1658