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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

L1 regularisation not working for linear regression

L1 regularisation not working for linear regression, here in below example I have created a data as y = 2x1 + 5x2 + 3*x3 + 5 Here in dataset x4 parmeter is there, but to calculate the output in ...
Nitul's user avatar
  • 997
0 votes
0 answers
3 views

RuntimeError: tensorflow subgraph tensor->dims->size != dims.size()

I was running following code from this suggestion: import tensorflow as tf import numpy as np import zipfile model_path = './UrbanSound.tflite' interpreter = tf.lite.Interpreter(model_path) ...
Sazzad Hissain Khan's user avatar
0 votes
0 answers
7 views

Is there a way to suppress STDERR message from tensorflow and XLA

When I run my python script, I had the messages below: WARNING: All log messages before absl::InitializeLog() is called are written to STDERR I0000 00:00:1701341037.989729 1542352 device_compiler.h:...
xxx yyy's user avatar
0 votes
0 answers
11 views

Mobilenet v3 - Problem with decode_prediction with savedModel

i have problem with pre-trained model Mobilenet_v3. I'm on the beginning of my learning path so sorry for mistake. I have apple image and I want preprocess this image and check it with pre-trained ...
ArturY's user avatar
  • 47
0 votes
0 answers
18 views

NaN gradients in TensorFlow

I am trying to learn an arbitrary 1D function using neural networks in TensorFlow. Here is my approach so far: I have a set of fundamental functions, and I want to be able to express any function in ...
Ryukendo Dey's user avatar
0 votes
0 answers
9 views

target_log_prob_fn for JointDistributionNamed

I'm currently learning Bayesian approaches through the book "Rethinking" and would like to utilize TensorFlow Probability. Specifically, I'm working on this chapter : https://colab.research....
Sosa's user avatar
  • 141
0 votes
1 answer
52 views

Manually perform predictions using the model weights and biases (Keras)

I'd like to manually predict data (regression task) using the model weights and biases in Keras (i.e., Z = f(WX+B), where Z is the output of a layer, W is the weight matrix, X is the input vector, and ...
Ronald Cabaoig's user avatar
0 votes
0 answers
4 views

Tensorflow: RBF Net for measuring speed of a fluid in a tub over microphone

I need a plan to bulid a RBF net over tensorflor to measure th speed of a flluid in a tub over a microphone. Plan is to make training samples of sound with th corresponding fluid speed. In use the ...
klausreckefusshamburgde's user avatar
0 votes
0 answers
27 views

Tensorflow C API compiled as .so library __gnu_cxx::recursive_init_error

Working with Ubuntu 20.04 x86_64, GCC 9.4.0, Tensorflow C API Linux CPU only. A simple C++ tensorflow model prediction code with cppflow wrap. //this is predict.cpp #include <iostream> #include ...
Alex Lau's user avatar
0 votes
0 answers
14 views

Tensorflow Serving prometheus metrics is unclear and latency is high

Background We have deployed a service with Tensorflow Serving (TFServing) container to Kubernetes with server-side batching enabled. When the service receives a inference request, it invokes TFServing ...
Jun.Z's user avatar
  • 1
1 vote
0 answers
21 views

Why is this AutoKeras NAS failing?

I have two directories, train_data_npy and valid_data_npy where there are 3013 and 1506 *.npy files, respectively. Each *.npy file has 12 columns of float types, of which the first nine columns are ...
user366312's user avatar
0 votes
0 answers
14 views

layers.Input in tensorflow -- TypeError: list indices must be integers or slices, not str

TLDR: I need this to work with the exact version of tensorflow (EfficientPose) mona@ada:~/EfficientPose$ python evaluate.py --phi 0 --weights weights/Weights/Linemod/object_8/phi_0_linemod_best_ADD.h5 ...
Mona Jalal's user avatar
  • 35.5k
0 votes
0 answers
9 views

creating an encoder-decoder LSTM model for text samarization in tensorflow

I'm trying to create an encoder-decoder LSTM model for text samarization in tensorflow.But i think my code isn't working properly can anyone fix it?🥺 importing libraries import io import json import ...
Prefect 's user avatar
0 votes
0 answers
43 views

GAN Training sees Generator Loss go to Zero While Producing Random Images

I have a dataset of images on which I am trying to train a GAN to create something similar. I have looked at various tutorials for how to train a GAN but am still getting random outputs from my ...
vassyesboy's user avatar
0 votes
0 answers
16 views

Object detection in image after training data

Good day to all, i have question about i get the code of training the surface crack detection the do test and show the confidence level of crack in table form. After that, i want to show it in like ...
Cheng Kai Chew's user avatar
0 votes
0 answers
37 views

What is the difference between Sequential and Concatenate of keras while creating input for model?

What is the difference between Sequential and Concatenate of keras while creating input for model? I have seen two way of creating layers with Sequential where we just define the shape of the input, ...
Nitul's user avatar
  • 997
-1 votes
0 answers
48 views

GradCam+ gives incorrect results when using with from scratch trained model

I am trying to use this implementation of grad_cam_plus for my binary classification model and I am getting no results.I noticed that conv_second_grad conv_third_grad are zero tensors so I think that'...
unit 1991's user avatar
  • 119
0 votes
0 answers
26 views

Keras - Logging loss that is made of multiple values

I'm using the following code to train a model. The loss is made of two different terms that are then summed up. I'd like to log each separated values for both train and validation. In particular I'd ...
Alessandro Bitetto's user avatar
-1 votes
0 answers
46 views

Replace LSTM with transformer in neural network

I'm trying to implement a model for accident anticipation in car dashcams videos (Anticipating-Accidents). My goal is to replace the LSTM used in the original project with a transformer and to compare ...
luibo's user avatar
  • 11
3 votes
0 answers
22 views

Unable to use Tensorflow Keras in scala

I'm trying to use Tensorflow and Keras in scala - for this I've added library dependencies of Tensorflow which works fine for me. I've followed official tensorflow github to use tensorflow in scala. ...
Zaryab Ali's user avatar
0 votes
0 answers
16 views

Tensorflow exceptions in dataset from generator logged before except block

I am trying to encapsulate my Tensorflow dataset generator in a try-except block. However, the whole traceback is logged before the code enters the catch block. In this minimal case: try: def ...
Arian Maghsoudnia's user avatar
0 votes
1 answer
18 views

Memory-efficient BERT Text Embedding for Large Dataset Preprocessing in TensorFlow

I'm working with a dataset containing approximately 920,614 rows and multiple columns, including "orig_item_title," "sub_item_title," "is_brand_same," and "...
krishna kaushik's user avatar
0 votes
0 answers
7 views

How to use a model with transfer learning using @tensorflow/tfjs-node

I am trying to use a trained model with learning transfer using the @tensorflow/tfjs-node library and I run into a problem not being able to use the exported model as it asks me for the layer of the ...
Jorge Luis's user avatar
0 votes
0 answers
21 views

Understanding difference between TensorFlow and PyTorch implementations of segmentation-models Unet

I am trying to convert the weights from a segmentation-models-based model that was trained in TensorFlow to PyTorch. I am using a U-net with an efficientnet-b0 backbone. I noticed a mismatch in the ...
sdg's user avatar
  • 144
0 votes
0 answers
27 views

Transfer learning using VGG16 MNIST Digits

I am trying to perform transfer learning on the MNIST digits. I am interested in obtaining the logits and using it for gradient based attacks. But for some reason, the kernel keeps dying even though ...
prynet's user avatar
  • 51
-4 votes
0 answers
37 views

How do I start with machine learning? [closed]

I am working on a graduation project. It's a website it's a bit similar to stack overflow. It shouldn't be like really working. I did the website backend using .NET 7 MVC C# and the frontend with Next....
Meap's user avatar
  • 1
0 votes
0 answers
22 views

Define Interpolate Tensorflow Function to maximize TPU performance

How to perform interpolation vector with tensorflow that maximize TPU performance? I have this code: import tensorflow as tf # Check if TPU is available try: resolver = tf.distribute....
Muhammad Ikhwan Perwira's user avatar
-1 votes
0 answers
26 views

ML script not learning correctly Sec2sec

The problem is that it is not learning correctly since the loss and accuracy value are loss: 0.0566 and the accuracy value is 0.9923 but those values ​​in the validation set that is val_loss are 2.1 ...
Fernando González's user avatar
0 votes
0 answers
23 views

Size differs by one for skip connection layers in unet, unable to concatenate due to size difference Keras

I am writing a discriminator architecture for a GAN that uses unet. My encoder and decoder blocks look like this: for _ in range(process_blocks): x = tf.keras.layers.Conv3D(num_filters, 4, ...
rob0tst0p's user avatar
  • 136
0 votes
0 answers
16 views

DqnAgent.train(): Loss is inf or nan

Problem: I am trying to use tf agent to train a DQN agent by following this tutorial while using my custom PyEnvironment, and somehow given the following code: for i in range(num_iterations): # ...
laezZ_boi's user avatar
1 vote
0 answers
24 views

Is There a Unified Approach to Extract Bounding Boxes and other for Different Object Detection Algorithms in TF lite?

I am creating an application where I couple different cameras to different neural networks to perform object detection using TensorFlow Lite. For now, I would like to use the YOLOv4 tiny, YOLOv8 small,...
mats fockaert's user avatar
0 votes
1 answer
74 views

Custom weighted IoU loss for binary semantic segmentation

I would like to ask if my implementation of the weighted IoU loss is correct. Given satellite images, I am trying to segment road and foreground pixels. def compute_loss(self, y_true, y_pred): ...
pjyamas's user avatar
  • 29
1 vote
1 answer
18 views

How to make `model.fit` stop training immediately when called on a naive model that does not have trainable layers?

I am writing a training pipeline for time series forecasting models. I am using a naive seasonal model as baseline, which just outputs the last out_steps of the input. class Naive(tf.keras.Model): def ...
giulatona's user avatar
  • 149
-2 votes
0 answers
11 views

Datasets for Vehicle attributes [closed]

Hi I need datasets for vehicle attributes ( type , model, plate ,color ,make ...) for school project I found dataset with just one or two attributes at most if there datasets woth more attributes ( ...
youssouf's user avatar
0 votes
0 answers
18 views

How to access batch data during Keras model training?

I'm building a custom metric to train a neural network in Keras, but I would need to use the model developed at the end of each training batch to develop class predictions for that given batch. The ...
Cam's user avatar
  • 1
0 votes
0 answers
12 views

Save batches of images for each epochs in Tensorflow via ImageDataGenerator

I create batches of images using ImageDataGenerator function in Tensorflow. I know that each batch of images for each epochs is slightly different according to the different transformations that ...
THE_KIM_JONG_UN's user avatar
-2 votes
0 answers
50 views

Error with Tensorflow in Python running in Visual Studio

Using Python with Visual Studio 17.7.4 running under Windows 10 version 10.0.19045 Build 19045 The install finished successfully, and when I import the library tensorflow lists the available methods. ...
johnstg2011's user avatar
-1 votes
0 answers
38 views

keras model.fit accuracy not the same as model.evaluate

For a certain purpose, I want to explore the fitting limit of a single neuron. For binary classification, I believe a neuron can perfectly fit a rising edge or a falling edge. Therefore, I want to ...
SuiFengPiaoYang's user avatar
-3 votes
0 answers
44 views

How to train a ML model for face comparison using tensorflow and use it in java? [closed]

I want to compare two faces, whether both are of same person or not. For this I've used pre-trained model (FaceNet) to get face-embeddings and compare two faces. In order to use FaceNet model, I've ...
Zaryab Ali's user avatar
0 votes
0 answers
22 views

How would I use Keras.backend.function( ) to find the predictions of each training batch?

I'm building a custom metric in Tensorflow, but in order to calculate it, I need the following data extracted at the end of each training batch: The probability predictions of each class The row ...
Cam's user avatar
  • 1
-3 votes
0 answers
34 views

How do I prevent overfitting and get a higher accuracy? [closed]

I am doing aspect based sentiment analysis and currently my model when fitting starts with the validation loss and accuracy higher than the training, but then it flips and training performs a lot ...
CIA11's user avatar
  • 55
0 votes
1 answer
33 views

install tensorflow wheel through requirements.txt

I'm working on a project and my processor is old, so I need to install a specific Tensorflow wheel, from here: https://github.com/fo40225/tensorflow-windows-wheel/tree/master/2.9.0/py39/CPU%2BGPU/...
Juan C's user avatar
  • 5,915
0 votes
0 answers
28 views

Preparing image segmentation dataset

I have 224, 224 greyscale images and 224, 224, 6 one hot encoded mask for image segmentation model. I saved the mask into npy file and organised the data as below. data/ ...images/ ......img_1.png .......
Seung's user avatar
  • 803
-3 votes
0 answers
16 views

Trouble implementing a neural network for image classification using TensorFlow [closed]

'm currently working on an image classification project using TensorFlow, and I'm facing challenges with the neural network implementation. Despite my efforts, the model doesn't seem to be learning ...
Vansh choudhary's user avatar
-1 votes
0 answers
63 views

I use Python 3.12.0, TensorFlow and PyTorch are incompatible with Python 3.12.0, what alternative can I choose?

What is a good alternative to Tensorflow and Python pip install tensorflow ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching ...
Steven's user avatar
  • 24.6k
0 votes
0 answers
13 views

Creating Two Time-Dependent Array Like Datasets for Keras LSTM Model in R

I am working on a time series forecasting project using a Keras LSTM - CNN model in R, and I need help creating two specific datasets for model training. My data spans from 2007 (week 26) to 2021 (...
toastershock's user avatar
0 votes
0 answers
9 views

CoreML returning Nan for no reasons

I'm having a same problem. I created a simple Transformer Decoder in TensorFlow, and it works well. But If I convert it to a CoreML model, from some point it start do just outputs MLMultiArray filled ...
Seungjun's user avatar
  • 884
0 votes
1 answer
40 views

image_dataset_from_directory can't read png, jpeg file

here is my code colab goes well but vscode doesn't image_dir = "ai/data/toonder_img" batch_size = 32 image_size = (64, 64) train_ds = image_dataset_from_directory( directory=image_dir, ...
kitewatermelon's user avatar
0 votes
0 answers
14 views

Custom Reinforcement Environment and Building Agent H

I'm trying to build a RL environment and an agent, and I'm having some difficulties to understand things. First of all, my problem is to fit 2 curves by some rules. I think I managed to create a ...
Metalel's user avatar
1 vote
0 answers
25 views

Cannot import tensorflow module and libtensorflow.so on linux x86

I have a python code using tensorflow and also calling a C++ dll which need tensorflow dll. The python run fine when I call only import tensorflow as tf, it also run fine when calling tensorflowdll = ...
Nathan's user avatar
  • 21

1
2 3 4 5
1654