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
0answers
4 views

Deep autoencoder: validation loss doesn't change

I'm trying to understand autoencoders and reproduced some code from Keras documentation: ...
0
votes
0answers
3 views

ValueError: Input 0 of layer dense_123 is incompatible with the layer: expected axis -1 of input shape to have value 20 but received input with shape

I was trying to use keras to build a fully connected neural network to predict the winner of men 100m race. For simplicity sake, my data $X$ consists of 6 races (so number of training data = 6), each ...
1
vote
0answers
5 views

Error while calculating accuracy and matrix multiplication in tensor flow code for regression

I was writing a code for linear regression using tensor flow but I was getting errors while calculating matrix multiplication using tensor flow and while calculating accuracy. ...
0
votes
0answers
14 views

How to calculate accuracy for regression using tensor flow [closed]

I was trying to run this code but I was getting some errors. I looked at the code thoroughly, but it appears correct. but I was getting errors at matrix multiplication and accuracy. ...
0
votes
2answers
22 views

Matrix multiplication using tensor flow

I am trying to run this code for linear regression using Tensor Flow. I have to use Tensor Flow matrix multiplication, but I am getting errors. My code: ...
0
votes
0answers
9 views

Keras model's embedding weight get NaN value

I am working on 3 categorical and 19 numerical features in which I plan to use trained embedding weights (from categorical features). After training, and get weights from embedding layers, I got NaN ...
2
votes
0answers
35 views

How can I solve this overfitting problem?

I think I have an overfitting problem. My goal is image captioning datasets with training 8,000 and testing 1,000. This my model for 50 epochs: ...
1
vote
0answers
11 views

Trouble with anomaly/novelty detection (on microscale) - need easy practical guide with Keras

I am relatively new to the field of machine learning. However, I already have solved simple image classification tasks with Keras (for example building CNNs and classifying MNIST...). The rough deep ...
0
votes
0answers
8 views

No gradients provided for any variable, when using Lambda to round model output

I have a problem where I need to predict some integers from an image. The problem is that this includes some negative integers too. I have done some reasearch and came accross Poisson which does count ...
0
votes
0answers
11 views

How do I represent audio file in a format that can be saved in dataset and then can be used in modelling?

i used the following code to read my audio file from scipy.io import wavfile samplerate, data = wavfile.read("the path of my audio") but when i tried to ...
0
votes
0answers
7 views

Backward LSTM in Pytorch

I'm in the process of rebuilding a network using PyTorch. The Keras implementation uses a LSTM module with the parameter go_backwards=true: ...
0
votes
0answers
6 views

What kinds of changes can I attempt on my object detector .config file to improve the detection accuracy?

I have trained an object detection model with 2 classes, around 7500 images, and approx. 10,000 annotations per class. I was able to fine-tune Faster R-CNN with ResNet (V1) from the Tensorflow Object ...
0
votes
0answers
15 views

Which steps are involved in sentiment analysis with Huggingface Transformers?

I want to perform a sentiment analysis of a dataset of (Spanish) tweets about COVID-19 vaccines. I've already scraped the tweets and identified a pretrained model I can use for Spanish. What I don't ...
0
votes
0answers
5 views

Simplest NN regression model for artificial 'rectangular' pattern?

Asuming we are looking for a simplest Tensorflow regression model for nonlinear dataset (1,) -> (1,) (a 'rectangular' pattern): This example dataset has 10000 ...
0
votes
0answers
6 views

Keras - target_size in ImageDataGenerator's 'flow_from_directory' is not accepting 24bit color value

I have defined the model's input shape as (150,150,3) ...
0
votes
0answers
12 views

How to create custom stochastic layer in tensorflow 2.0?

Recently, I have been looking into Stochastic neural networks and would like to try creating one; however, I am not sure where to start. I have experience in Python and have been learning TensorFlow ...
1
vote
0answers
20 views

How is GPU still used while cuda out-of-memory error occurs?

I am using Tensorflow to perform inference on a dataset on Ubuntu. While it reports a cuda out-of-memory error, the nvidia-smi tool still shows that GPU is used, as shown below: My code is predicting ...
2
votes
0answers
20 views

Why does my validation loss increase, but validation accuracy perfectly matches training accuracy?

I am building a simple 1D convolutional neural network in Keras. Here is the model: ...
0
votes
1answer
14 views

What are the allowed ops for Tensorflow Lite for Microcontrollers?

Currently, I am studying Tensorflow Lite For Microcontrollers (TLFM). I have gone over all the tutorials. Now I will write my own code where I will try to detect some anomalies based on the ...
0
votes
0answers
30 views

ValueError: `validation_split` is only supported for Tensors or NumPy arrays, found following input: RaggedTensor

I have following inputs to be trained on a CNN: x = np.array(Images) y = [ [[0]], [[76., 5., 9., 1., 0., 0.], [54., 4., 10., 51.]] ] Since the ...
0
votes
0answers
19 views

Keras data augmentation for fashion minst data set performs worse than without it

I am trying to build an image classification model for fashion mnist data set. I designed a network and achieved accuracy of ~93%. I wanted to improve it further, so I decided to augment data using <...
0
votes
1answer
16 views

Tensorflow parameters for CNN

I created the below simple model (taken from a Coursera course). It has a total of five convolutions. ...
0
votes
0answers
6 views

Why do CNN regression models fail to localise an object when the scale, aspect & image type has significant variance?

Background I'm wanting to understand how to build an object detection algorithm from scratch. My initial thoughts were that architectures like YOLO and Faster-RCNN would find any object given enough ...
0
votes
0answers
8 views

Tensorflow Model permanently becomes corrupt when input embeddings exceed max_position_embeddings

I use Tensorflow C++ API. I have a Tensorflow model. I give some inputs to this model. There is a parameter called max_position_embeddings This parameter determines maximum acceptable input dimensions ...
0
votes
0answers
9 views

Memory problem when running Tensorflow with Flask and Docker

I've trained a Tensorflow object detection model and want to deploy it with Flask. My problem is that with every new request the memory used by docker container rises by ~100mb, which is not freed ...
0
votes
0answers
15 views

Dense Keras network returns constant output, even for very simple models

I am trying to use keras dense neural networks to forecast some time series. When fitting my model on complex real datasets, my model converges toward a constant output, i.e. whatever the input, the ...
0
votes
0answers
13 views

Generate full face from half face image in Tensorflow

Has anyone found any examples of how an ML model can generate an image of a complete face using only an image of half a face? I figured this would be a case I'd be able to find easily on Google but I ...
0
votes
0answers
9 views

How to use a complex tf/keras functionnal model for UMAP-learn?

I am trying to use Parametric UMAP with a keras model. My model is a rather complex functionnal model with multiple heads. However parametric UMAP seems to only accept sequential models. What kind of ...
0
votes
0answers
12 views

Why is VGG16 better for object localisation than MobileNet?

Prologue I have been trying to perform object localization to provide the [x1,y1,x2,y2] coordinates of objects in an image using Keras. I was stuck for ever because I was using MobileNetV2 as my ...
0
votes
1answer
25 views

Wrong loss function outperforming correct loss function?

Dataset I have a dataset which is in the following format: 834 inputs: 2 floats between 0-1, and 832 integers created from one-hot-encoding 64 values (13 classes per value). 4096 outputs: Each is a ...
0
votes
1answer
4 views

Mixed precision with a keras data generator

I need to use keras.preprocessing.image_dataset_from_directory() for a large dataset. My GPU is RTX so I would also like to use mixed precision training in Tensorflow 2.5. How do I cast the output ...
0
votes
0answers
12 views

How to handle text data for prediction with LSTM and to predict data that are not in text?

I want to use a column of text data. then want to predict some length of stay not as binary classification. For example, the text column is of different names of diseases and I want to predict the ...
0
votes
0answers
17 views

Multi-Label Regression of Categorical Probability Distribution that adds up to one

What would an ideal Tensorflow/Keras architecture look like, if the target is a multi-regression with values that add up to one? Toy Example: Tv Channels You work for a big TV-Station and your boss ...
0
votes
0answers
18 views

Sentiment analysis with the help of word embeddings

I am doing sentiment analysis with GloVe and Fast Text word embeddings on a tweet dataset (using tensorflow & keras). I am trying to compare two models in terms of 'accuracy'. But each time, I run ...
0
votes
1answer
21 views

How to Inference With Keras Sequential Models (Text Classification)

I have the following LSTM model and I can't make inference with it: ...
0
votes
1answer
53 views

I am getting (loss: nan - accuracy: 0.0000e+00) for all epochs after training the model

I made a simple model to train my data set which consists of (210 samples and each sample consists of a numpy array of 22 values) and x_trian and ...
0
votes
0answers
9 views

Tensorflow Probability Implementation of Automatic Differentiation Variational Inference with Mixtures

In this paper, the authors suggest using the following loss instead of the traditional ELBO in order to train what basically is a Variational Autoencoder with a Gaussian Mixture Model instead of a ...
0
votes
1answer
26 views

Machine Learning in Tensorflow

I am doing a work that is based on analyzing different Python libraries for Machine Learning. I chose to analyze Scikit-Learn, Keras, Tensorflow and Pytorch for being the most known ones. The idea was ...
0
votes
0answers
8 views

How can I resume my saved model for training on next epochs?

This is the model which I saved, I have trained the model for 3 epochs, I am wanting to train it for next finite epochs, can any one tell me how can I resume the training process for next 3-finite ...
0
votes
0answers
3 views

Tensorflow text tokenizer incorrect tokenization

I am trying to use TF Tokenizer for a NLP model ...
0
votes
1answer
11 views

How do I predict with a Keras model on a dataset similar to how preprocessing.image_dataset_from_directory is formatted

I was wondering if anyone has written code where I can read from a directory of image (not having a subfolder inside to represent a "class") and then running model.predict() on it. I do not ...
1
vote
0answers
10 views

Is this set of vectors representing direction in a sequence trainable across LSTM? if not, what are the drawbacks?

I am starting my Neural Network Project for the first time, I have a lot of expectations: The main idea is primarily analyzing the pattern of my writings or drawings when using the mouse given a ...
0
votes
0answers
12 views

Training a Keras multi-task model with subsets of labels in each training example

Keras allows you to freeze layers, which helps with fine-tuning models. However, if you have a multi-task problem where each training example only contains a subset of the labels (e.g. only one label) ...
0
votes
0answers
5 views

save reconstructed data points from variational autoencoder as original MNIST

I have a VAE implementation that generates images from the latent distribution. I want to save those "images" as we have in the original dataset. For example, my VAE generates a data point, ...
0
votes
0answers
15 views

Tensorflow Keras predicting one-hot-vectors

I am trying to build a recommender predicting products. The inputs are one-hot encoded product IDs, and so is the output. (0, 0, 1, 0) to (1, 0, 0, 0) There are 83 unique IDs in the first category and ...
0
votes
0answers
11 views

t5-base Survey data text summary analytics - How to go above 512 output characters without many special characters in the output text

Goal Form many survey answers getting a summary = (average answer of customers) without reading thousands of answers ERROR When I am running it on a Wikipedia article ex.: Assassins' creed just the ...
0
votes
0answers
10 views
0
votes
2answers
45 views

Can't use The SGD optimizer

I am using the following code: ...
0
votes
1answer
26 views

Tensorflow for Deeplearning and Machine learrning

We can use TensorFlow for both machine learning and deep learning. So why do we use scikit-learn more in machine learning and not TensorFlow? Are they both alternatives of each other?

1
2 3 4 5
39