Questions tagged [tensorflow]

TensorFlow is an open source library for machine learning and machine intelligence. TensorFlow uses data flow graphs with tensors flowing along edges. For details, see https://www.tensorflow.org. TensorFlow is released under an Apache 2.0 License.

Filter by
Sorted by
Tagged with
1
vote
1answer
8 views

Universal Sentence Encoder MultiLingual inside Flask

I am having an issue using Universal Sentence Encoder(USE) Multilingual inside a flask app. I am using it with TF2. When I initialize the flask app and load the USE model using hub.load() and then ...
0
votes
0answers
6 views

How to use computer vision datasets like MSCOCO for object detection?

Im currently trying to understand tensorflow and specific the Tensorflow Object Detection API. I understood that I need annoted images which define regions of interest. Now I'm thinking about trying ...
0
votes
0answers
17 views

Normalizing images with OpenCV (divide by 255)

I'm loading images from my dataset, which are all of resolution 200x200 and in RGB format. I'm loading them using OpenCV for Python, with the following code: ...
0
votes
0answers
9 views

Split a tensorflow (.pb) model into two separate models

I have a tensorflow (.pb) model, it has has some convolution and maxpooling layers followed by dense layers. I would like to split it in two pats. The first containing the convolutions/maxpooling part,...
0
votes
1answer
16 views

Dense INPUT Layer: When do I have to specify the input shape?

In the below code: I get an error when I do not specify the input shape in the $1^{st}$ layer. I thought that TensorFlow can infer the shape for the dense layer. For some code I have seen, TensorFlow ...
0
votes
1answer
23 views

Need help understanding how this Neural Network is working

This is a model I came across, and I need some help understanding how it works It uses South German Credit Prediction data set from Kaggle ...
0
votes
0answers
13 views

Keras Adam Optimizer minimize function: no gradientes provided

I need to optimize a function with Adam Optimizer (no Neural Network involved). I made a dummy example to understand how it works, using the minimize function but ...
0
votes
0answers
10 views

How to stack Transfer Learning models in a Sequential

To make a nice architecture, I wanted to stack Transfer Learning models one over the other. The three models I wanted to stack were : VGG16 InceptionV3 Resnet50 So, I defined the three models as ...
0
votes
0answers
17 views

Confused about how ResNets improve simple CNNs

Recently I have been studying residual networks after a general introduction to CNNs. However, I have two big questions I haven't been able to answer while studying the original paper of He et al. ...
0
votes
0answers
23 views

Adding a static layer to LSTM text generation

I am using Tensorflow guide to build a LSTM text generation model (uses the keras functional API) (https://www.tensorflow.org/text/tutorials/text_generation) I would like to add an additional input ...
0
votes
0answers
5 views

Update tensorflow model with new data

I have trained the time series prediction model using old data, and as time goes by, I get more data and want to update my model with it. But it seems like my model perform worse as I update the model....
0
votes
0answers
11 views

TensorFlow Speech Emotion Recognition Model gives same prediction for all inputs

Dataset used: RAVDESS (I've only used the audio only files) Here's a sample after I've processed the data: And the code for the label encoding: ...
0
votes
0answers
89 views

Cannot test custom object detection model

I am using this tutorial: https://gilberttanner.com/blog/tensorflow-object-detection-with-tensorflow-2-creating-a-custom-model . I have trained the model but when I try to test it with this command: <...
0
votes
2answers
50 views

How to categorise customer complaint using NLP

I have a dataset of community complaints and I would like to build a NLP model on those descriptions and tag a category (can be referred for an inspection or Not ie "Not referred) to each of them....
0
votes
1answer
26 views

resnet50 based model classification loss increase

I'm trying to classify fonts in images into 7 classes. I wanted to use a pre-trained ResNet50 for the task and use its features to my classification. So I've followed some guide and came up with the ...
0
votes
0answers
12 views

Keras CNN low training and val acc

I don't what is wrong with my current network architecture maybe some of you can help. I have a dataset that is highly imbalanced so i have implemented a datagenerator which balances the image data so ...
0
votes
1answer
21 views

Conv2d for image with additional features as input layer

I would like to train a model with Keras and TensorFlow. My input consists of images and some additional features. I would like to use conv2d for the images and dense for the other inputs. The ...
0
votes
0answers
17 views

What is the difference between batch, batch_size, timesteps & features in Tensorflow?

I am new to deep learning and I am utterly confused about the terminology. In the Tensorflow documentation, for [RNN layer] https://www.tensorflow.org/api_docs/python/tf/keras/layers/RNN#input_shape <...
0
votes
0answers
9 views

RNN Input Shape: Is the 1st Dimension the number of Batch or the Batch Size?

I am new to Deep Learning. I read different explanation of the input shape for the 1st layer. This explanation seem to imply the 1st D is the Batch Size: ...
1
vote
1answer
19 views

Keras: How to restore initial weights when using EarlyStopping

Using Keras, I setup EarlyStoping like this: EarlyStopping(monitor='val_loss', min_delta=0, patience=100, verbose=0, mode='min', restore_best_weights=True) When I ...
2
votes
1answer
18 views

Data preprocessing framework/library alternatives

I am currently working on some python machine learning projects that are soon to be deployed to production. As such, in our team we are interested in doing this the most "correct" way, ...
1
vote
0answers
30 views

Error parsing message with type 'tensorflow.SavedModel'

This is the error message i get- ...
0
votes
0answers
18 views

What is leaking rate?

I am implementing an echo state network using TensorFlow and am studying the parameters, one of which is called "leaky". The documented definition is as follows: Float between 0 and 1. ...
0
votes
1answer
38 views

How to perform regression on image data using Tensorflow?

Overview I understand the surface of the mathematics* of simple neural networks. I went through single label image clasification problems (ie using MNIST & fashion-MNIST datasets) using native ...
0
votes
0answers
12 views

Training a ML model with a table for each observation

I have several csv's which are inputs for a row of outputs. A sample input dataset can look something like this: whose output would be as follows: The task is to train a model by reading each csv as ...
8
votes
1answer
352 views

How could I estimate slope of lines on a scatter plot?

I have a list of coordinate pairs. To the human eye, they form lines with a constant slope: This is how I generated that image above: ...
0
votes
1answer
26 views

working with data loaded from tensorflow datasets

I've uploaded data from tfds(car196) and I've done some transformation to it(found some guides online) First questions if can I change the data type from :MapDataSet/BatchDataSet to some kind of numpy ...
1
vote
1answer
35 views

should text augmentation take place before or after splitting the dataset?

I've a text dataset with ~20000 samples (which is not enough). I used text augmentation to "invent" more samples so essentially I've multiplied each sample by 10 - ending up with ~200000 ...
0
votes
0answers
9 views

How to prepare data for the encoder part of the model in chatbot using Tensorflow?

I hope you are doing great. I am trying to build a chatbot using Tensorflow. The dataset I am using is cornell movie dialogs. I have a very basic doubt. I am almost done with the preprocessing part of ...
0
votes
0answers
6 views

How to represent a state-space model as Neural Network?

How does one represent a State-Space model with a Neural Network? I would say the simplest way would be to use a Recurrent Neural Network, but I'm not sure how...
0
votes
0answers
15 views

Reducing Tensorflow model prediction time

My Tensorflow object detection (faster RCNN) model is taking ~6 sec to predict. Can anyone let me know how can I make prediction time to millisec without compromising on accuracy My system ...
0
votes
0answers
12 views

Custom Tensorflow loss function that disincentivizes all black pixels

I'm training a Tensorflow model that receives an image and segments the image into foreground and background. That is, if the input image is w x h x 3, then the ...
0
votes
0answers
11 views

LSTM Multiple Independent Input Time Series - Data Preprocessing

Given a single univariate time series of complexity say 5, look-back of 2 and forecast of 1 the generated samples would be: TS = [ 1 , 2 , 3 , 4 , 5 ] xTrain = [ [1,2] , [2,3] , [3,4] ] that gets ...
0
votes
0answers
13 views

How to standardize a tensor

When I have an image , I can standardize the image channel-wise as follows : ...
0
votes
0answers
15 views

conda/pip package conflicts for tensorflow-gpu

I am using ubuntu 20.04 in Windows 11's WSL2 environment. The PC has a Nvidia GPU and so I have been using CUDA to accelerate tensorflow code execution. I used conda to install tensorflow 2.6.2 and it ...
0
votes
0answers
14 views

Custom loss function for out of distribution detection using CNN in Tensorflow 2.0+

My question is in reference to the paper "Learning Confidence for Out-of-Distribution Detection in Neural Networks". I need help in creating a custom loss function in TensorFlow 2.0+ as per ...
0
votes
1answer
13 views

How can I change shape of the input image array as per my trained TensorFlow model input?

I have a Tensorflow model weight file that I am using to make the prediction on test images. These test images are in NumPy array format and the shapes of the images are (720, 1280, 3). I am getting ...
1
vote
0answers
14 views

Tensorflow model structure is strangely deformed in model.fit()

I was able to confirm (by checking model.summary()) that a model with the correct structure was successfully created. However, when ...
1
vote
0answers
11 views

Tensorflow text classification in R using 3 classes - Error in py_call_impl(callable, dots\$args, dots\$keywords)

I'm working on a text classification problem that classifies some tweets into one of three labels. I have two columns in my dataset: Score column with the value of 0 (negative), 1 (positive) or 2 (...
0
votes
0answers
25 views

Keras: Predict a combination of categorical and continuous variables

The output I am trying to predict with my keras model contains a mixture of continuous and categorical variables. How do I design the architecture to simultaneously predict continuous and categorical ...
0
votes
0answers
22 views

Instance segmentation - Which is the best approach for my use case?

I am looking to train an instance segmentation model that will be running on the edge, like on mobile devices. What is the best network (Mask RCNN, DeepLab v2/3 etc.) for this use case? Which gives ...
0
votes
0answers
15 views

Handling Overfitting(diverging val loss and train loss) in Conv-LSTM

This is related to an Educational Research Project I'm using to learn stuff so please be kind. I'm working on a video binary classification task. I have almost 1400 videos of both classes. I also ...
2
votes
1answer
93 views

Why is my training loss not changing?

I'm trying to train a semantic segmentation model based on this architecture, using this one as a base. The base model uses about 10 ReLU activations, and when implemented according to the first paper,...
0
votes
0answers
22 views

Deep learning - edge detection

I am trying to build a model, which would be used for edge detection of the iris. For this purpose, I have built a U-net model, which successfully works for image segmentation tasks. Also, I have a ...
0
votes
0answers
10 views

Cross-validation with time series data and Deep Learning Models

I have in a pandas dataframe two columns: "GDP" and "Unemployment Rate", from 1950 until now. I'm trying to apply a simple RNN model to this data, where we would use past and ...
1
vote
1answer
12 views

Error Loading and Training on Tensorflow's 'Speech Commands Dataset'

I am trying to replicate the most basic version of this Google LEAF example. I am having problems loading in the Tensorflow Speech Commands Dataset. I load the datasets in as a TFRecord: ...
1
vote
1answer
18 views

In my GAN model, the discriminator loss quickly descends to magnitudes of $10^{-4}$ while generator loss is at levels of 5+?

I am creating a Generative Adversarial Network (GAN) for generating artificial trading cards, but I am a complete novice in the field. The problem I'm consistently having is that my discriminator, ...
0
votes
0answers
66 views

Error:DQN expects a model that has one dimension for each action, in this case (1, 2, 1, 0)

I am building an RL agent for which the model is defined: ...
0
votes
0answers
6 views

Issue with tensors possibly being read in. IndexError: list index out of range

I'm trying to use a pre-defined tensor flow dataset. I have read the file in but I am having difficulty with building a CNN when I split the data into x and y (or image and label data. The relevant ...

1
2 3 4 5
41