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
0
votes
0answers
8 views

How to run neural network in gpu instead of cpu?

I installed cuDNN and cuda toolkit 11 in my machine. Now I installed tensorflow-gpu in pip3. But while running neural network, cpu is being used 90% with four cores and gpu is being used just 7%-15%. ...
1
vote
0answers
6 views

Keras deep learning speaker identification model excels during training and then fails predictions

I am attempting to create a 1:N speaker identification model with Keras using a TensorFlow backend. I used the LibriSpeech corpus for training data, and preprocessed the data by first converting each ...
0
votes
0answers
12 views

Retrain Tensorflow CNN Model on additional Images

So I've created a model to classify images of traffic signs. I'm currently using this model to predict classes of images I've gotten from the internet. However, I would like to be able to re-classify ...
1
vote
2answers
25 views

Tensorflow, how many layers does this model have?

I'm very new to machine learning and I'm not sure about Tensorflow implementation of neural network model. How many layers does the model below have? ...
0
votes
1answer
18 views

Multiclassification with large number of labels

I am attempting to build a classifier with a large input space of one hot encoded vectors. The output should be a vector of labels, with 10000 possible labels each. For example, the labels could ...
1
vote
0answers
34 views

MobileNetv1 - High and Fluctuating validation metrics

i've been using the MobileNetv1 model, pre-trained on ImageNet in Keras. I replaced the last layer with my own softmax layer to classify my images into one of 10 classes (maybe too few for such model ...
3
votes
1answer
19 views

Can I install Tensorflow and Keras on Cloud?

I will like to install Tensorflow and Keras on my PC. I use 32 bits OS. I learnt Tensorflow is not compatible with 32 bits. I cannot upgrade my OS to 64 bits since my hardware does not support it. I ...
1
vote
2answers
18 views

SparseCategoricalCrosstentropy vs sparse_categorical_crossentropy

What is the difference between SparseCategoricalCrosstentropy and sparse_categorical_crossentropy ? SparseCategoricalCrossentropy - Computes the crossentropy loss between the labels and predictions. ...
0
votes
0answers
21 views

Hierarchical transformer for document classification: error with model implementation, and advice on extracting attention weights

I am trying to implement a hierarchical transformer for document classification in Keras/tensorflow, in which: (1) a word-level transformer produces a representation of each sentence, and attention ...
3
votes
0answers
28 views

AlexNet Research Paper VS PytTorch and Tensorflow implementation

I'm making my way through Deep Learning research papers, starting with AlexNet, and I found differences in the implementation of PyTorch and Tensorflow that I can't explain. In the research paper, ...
0
votes
1answer
6 views

Retraining of object detection models

I came across the concept of retraining of models a few days back. So tensorflow recommends to retrain an already trained model instead of making a new one from scratch so that the whole process takes ...
0
votes
2answers
28 views

Is there a method to apply trained weights to a model with the same input shape and model architecture but different output shape?

I am developing a speaker identification model in Keras, and I have saved the weights from a trained custom model. Now, I am looking to use the trained weights to fine tune the model on a new dataset, ...
0
votes
1answer
8 views

Dataset map function error : TypeError: Expected list for 'input' argument to 'EagerPyFunc' Op, not Tensor

I am currently trying to write a script to create a TFRecord file. Therefore, I am following the instruction on the offical tensorflow website: https://www.tensorflow.org/tutorials/load_data/tfrecord#...
0
votes
0answers
16 views

Classifying Live Images From Camera Feed with bunch of objects in Background?

I can successfully run image classification if I feed examples from Google image to mobilenet model on Raspberry pi with Google Coral Edge TPU. However, if I feed live images from camera in my living ...
1
vote
1answer
23 views

What do `loss` and `accuracy` values mean?

I'm using this: Python version: 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)] TensorFlow version: 2.1.0 Eager execution: True With this U-Net ...
0
votes
0answers
14 views

Get optimizer state tensorflow

I am currently working into a problem that requires to redefine the same model multiple times, just having "logical" variations that do not change the model structure. In doing that, I would ...
0
votes
1answer
16 views

How to input LSTM output to MLP with concatenate?

I am having a training data set for a time-series dataset like below where my target variable is var1(t) which is the value of var 1 at time=t. ...
0
votes
2answers
19 views

Why don't companies use on-device ML to serve ads to protect privacy?

Eg: The ad inventory can be stored in the cloud. Using on device ML, a process then matches the ad to the user in order to serve the best ad to the right user. Are there any limitations to this? (I ...
0
votes
0answers
14 views

Multi Image to Single Image Assocaition

I have a dataset of drone captured images (non-geotaggged) which I would like to stitch to form a single image. I wanted to know what type of a neural network can I use to associate multiple images to ...
0
votes
0answers
9 views

Why is my time series model predicting strange results?

I am trying to predict some time-series data. The output data predicts two numbers (one that's usually greater than 1 and another that is usually less than 1). I've plotted about 800 samples where the ...
0
votes
1answer
30 views

No gradients provided for any variable: ['Variable:0', 'Variable:0']

I am using Python 3.6 and Tensorflow 2.0 for the following code for linear regression: ...
2
votes
1answer
21 views

What are some options to add or remove nodes from a multiclass classification model?

I'm building a classification model that will need to classify into one of many possible outputs. I know in advance that I will need to add and subtract nodes from the output layer as circumstances ...
0
votes
1answer
23 views

accuracy, val_accuracy remains the same while training

I build a CNN based on the Chest X-Ray Images (Pneumonia) dataset and for some reason when I train the model I get the same accuracy and val_accuracy over epochs. ...
0
votes
0answers
13 views

predict the length of a sentence

I imagine setting up training data with this format: (sentences would typically be 10 - 40 words) For training: ...
1
vote
0answers
8 views

How to properly train CNN on Full Digital Mammography

I am trying to train my Convolutional Neural Network on full digital mammography images. Here are example dimensions from a random sample: (5832, 4104, 3). Which ...
0
votes
0answers
14 views

Best NN for image pattern recognition without classifier

For images like this I'm trying to split up the cells (the different rectangles). The cells, can vary in size, brightness and so forth. I tried multiple ways using OpenCV for about 5 days, I almost ...
0
votes
1answer
26 views

Bert-Transformer : Why Bert transformer uses [CLS] token for classification instead of average over all tokens?

I am doing experiments on bert architecture and found out that most of the fine-tuning task takes the final hidden layer as text representation and later they pass it to other models for the further ...
-1
votes
1answer
12 views

Using LSTM to predict next word performs poorly

I am training a model to predict the next word in a sequence, my data is comprised of Reddit post titles and is structured as: ...
-1
votes
1answer
10 views

training accuracy greater than validation accuracy

The problem that I'm facing is that the training accuracy of my model is way higher than the validation accuracy, were talking about an approximate value of 0.2. ...
1
vote
0answers
30 views

Streaming sequence detection (Binary Classification) LSTM/GRU

I am currently trying to implement a model which can detect a specific sequence according to the training data which looks like the following: ...
0
votes
0answers
22 views

How to use Tensorflow in Project Malmo

I've taken a tensorflow for beginner course and I'm wondering if Project Malmo can be use with Tensorflow, just a simple demonstration will do. Specifically, I'm trying to modify tutorial_6 of python-...
0
votes
0answers
13 views

Training Flags on Keras Layers

I'm pretty new the Tensorflow and Keras and I've started to build a simple GAN to analyze and then synthesize some time-series data. I would like to ask for some feedback to confirm my suspicions ...
3
votes
2answers
53 views

Keras OOM for data validation using GPU

I'm trying to run a deep model using GPU and seems Keras running the validation against the whole validation data set in one batch instead of validating in many batches and that's causing out of ...
0
votes
0answers
12 views

How to troubleshoot TensorFlow error “Restoring from checkpoint failed.” [migrated]

I am new to Tensorflow, I have been using a trained model from a Git repository. The pre-trained model is saved in '../model/snapshot-38' directory. I have snapshot-38.index, snapshot-38.meta, ...
0
votes
1answer
26 views
0
votes
0answers
19 views

A pretrained model for mathematical equations characters detection

I am working on a project to convert equations to LaTeX code. After segmenting out the characters, I got stuck on the detection part and was looking for some pre-trained model that could detect ...
1
vote
1answer
25 views

Loaded model predicts well in colab but gives same label and accuracy when downloaded

I have developed a Recurrent Neural Network to perform sentiment analysis on tweets using the Kazanova/sentiment140 dataset in Kaggle. The model looks like this: ...
0
votes
1answer
13 views

Varying Image sizes in Tensorflow Malaria dataset | Dealing with unclean tensorflow data

I am trying to build a CNN based image recognition system for the Tensorflow malaria dataset. I loaded the dataset (~27k RGB images) using conventional tensorflow_datasets syntax. After some data ...
0
votes
0answers
25 views

Image Segmentation Class weight using tensorflow keras

I remember definitely being able to pass a list to class_weight with keras (binary image segmentation specifically). For example: ...
0
votes
0answers
15 views

How to interpret hard negative mining curves while training a deep object detector?

I am training a single shot detector (SSD) in tensorflow object detection API. After having read the paper and some articles online, I understood that hard negative mining trains the network on 'hard ...
0
votes
2answers
81 views

How can I build a self-attention model with tf.keras.layers.Attention?

I have completed an easy many-to-one LSTM model as following. ...
1
vote
0answers
25 views

Why is Tensorflow LSTM training slower on a machine with far better components?

Training an LSTM using the exact code and dataset on two different machines with different components yields different results in terms of training time. However, for my case, the results were the ...
0
votes
0answers
15 views

Transfer learning with Keras for medical image classification

Good afternoon; I'm trying to do Transfer Learning from pre-trained model on imagenet to solve a classification task with Lung CT slices. These slices are stored in ...
0
votes
1answer
74 views

AttributeError: module 'tensorflow.python.keras.utils' has no attribute 'to_categorical'

I'm trying to run the code below in my Jupyter Notebook. I get: AttributeError: module 'tensorflow.python.keras.utils' has no attribute 'to_categorical' This is code from Kaggle tutorial. I have ...
0
votes
0answers
6 views

error while training the bert model on tensorflow 2.0 [migrated]

I was trying to train a bert model in tensorflow 2.0 and encounter an error (when I hit model.fit) . Anyone knows what this kind of error is!? Thanks in advance. ...
0
votes
2answers
14 views

Need for Dense layer in Text Classifcation

While creating a model for text classification, what is the need for a Dense Layer? I noticed in multiple examples the following is the structure. A softmax is what required right instead of the Dense ...
0
votes
0answers
29 views

tf.keras.layers.Reshape() is significantly slowing down execution speed

I have the following toy example to illustrate the problem I am having. The encoder is a pretrained Xception model (its forward step takes negligible time). The strange thing is that I get a huge ...
0
votes
0answers
15 views

Finding location to get text from in images

I have the task of pulling text from forms given an image of the form. For example, the form may have the form number at the top left or top center. Knowing this, I am supposed to be able to output ...
1
vote
1answer
31 views

Why does categorical_crossentropy work in when input is not 1-hot encoded?

I'm going through lessons on the REINFORCE algorithm to solve Cartpole/Pong/etc (using AIGym) and every one uses categorical_crossentropy as the loss function. What's confusing me is that ...
0
votes
0answers
22 views

How to pass noisy images as input and original images as labels in Keras - Autoencoders

I want to make denoising autoencoder, I've added some noise to images, and i want to use them for training, original images will be used as label. Reading the keras documentation I've found that I ...

1
2 3 4 5
30