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

Approach to object detection in tensorflow

So I'm making a TensorFlow model to detect an enemy player on screen (if present) and return me its position. I'm using transfer learning with some fine tuning because it's much faster than training ...
0
votes
0answers
9 views

Load training data sequentially to avoid memory error

How can I load data of shape: X_train : (4864,6989) X_test : (2085, 6989) y_train : (4864, 270) y_test : (2005, 270) into the memory? I have 16 GB of RAM. What ...
0
votes
0answers
6 views

Tensorflow - Manually decay Adam optimizer

I've been experimenting with reinforcement learning and using the train_on_batch method of tf.keras.models.Model to update the ...
0
votes
0answers
10 views

How can I change the loss function when the shape of my data changes?

Since my data is too large, I use pd.read_csv('',chunksize=). I am using categorical_crossentropy as my loss function, however, ...
0
votes
0answers
6 views

Taking huge time to execute piepeline text classification model using sklearn?

I have created a pipeline model for text classification using python ,Firstly i have tried on 30k records dataset it is working fine got the good results , but when it comes to huge data set like 50k ...
0
votes
0answers
6 views

Projected gradient descent in keras

I am currently working on a project and I need to do project gradient descent instead of vanilla gradient descent on a network. I am unsure if current deep learning frameworks have that functionality. ...
0
votes
1answer
12 views

TF2.0 DQN has a loss of 0?

I am having a hard time understanding why my loss is constantly a zero when using DQN. I'm trying to use the gym environment to play the game ...
0
votes
0answers
7 views

Storing outputs from convolutional layers

I am working on a CNN architecture over video clips that attempts to separate temporal and spatial features, inspired by this paper. The relevant architecture is on Figure 5(b). Here is my idea: I ...
0
votes
0answers
20 views

Input Shape Problem with Ragged Tensor input in RNN

I have created ragged tensors from python lists as below: list_a=tf.ragged.constant(list_a) list_b=tf.ragged.constant(list_b) Checking the shapes gives me: <...
0
votes
0answers
18 views

tf.keras: val accuracy on mnist dataset drops to random guess

For transfer learning purposes I changed mnist into 224x224 px dataset and applied skeletonizing algorithms. I want to train MNIST dataset on "squeezenet" like CNN, which can be found on github. The ...
-1
votes
0answers
10 views
1
vote
0answers
43 views

Sudden drop of score in the last few episodes

I was following this tutorial about lunar lander and deep Q learning with Tensorflow 2 and I noticed something odd. The problem was actually solved at episode 476 but then the score went from 259.90 ...
8
votes
1answer
339 views

Train a GAN on “before and after” images of dental surgeries [closed]

I want a GAN to train on "before and after" images of dental surgeries; so that it can generate "after" pictures for fresh patients. Input images are like these: https://img.webmd.com/dtmcms/live/...
0
votes
0answers
5 views

specifics of dilated convolutions in tensorflow

This ones a little esoteric. I'm developing a wave-net inspired model. First time needing dilated convolutions. My question is which values is the convolution looking at relative to the output ...
1
vote
0answers
18 views

deep learning keras best practices

There isnt a lot of wisdom here but on a regression data set, I can get a slightly lower RSME with adding in a learning rate schedule for exponential decay. The curve on the plot is also slightly ...
0
votes
0answers
11 views

Does someone have a low level inplemenation of tensorflow's ConvLSTM2D

Right now I am using the ConvLSTM2D module of tensorflow and it works. But now I would like to feed an additional input between the convolutional stage and the lstm module. Therefore I would need a ...
-2
votes
1answer
25 views

what is learning rate in neural network?

When I am creating a model using Keras we should define the learning rate(lr) in that optimizer method Please refer to the below code. ...
1
vote
0answers
26 views

How to remove layers from a TensorFlow2 model?

I have a CNN model which has a lambda layer doing One-Hot encoding of the input. I am trying to remove this Lambda layer after loading the trained network from a h5 file. So far I have tried to create ...
0
votes
0answers
19 views

Self-driving AI model starts overfitting

I'm trying to make a self-driving AI that can drive around in GTA-San Andreas by following sentdex's videos on making a self-driving AI for GTA-V but my model always starts to overfit after 4 epochs ...
0
votes
0answers
6 views

Is there any way to stop a jupyter cell mid-training and not lose the weights trained till that point?

My Deep Learning Network has been running quite some time now and has not reached halfway through its total epochs and nowhere near to the conditions to invoke the callback. However, I would like to ...
0
votes
0answers
25 views

Neural network always outputting 1

I'm trying to develop a small network for the aerial cactus identification challenge. This is a binary classification challenge (0 no cactus, 1 is cactus), but my networks is always outputting 1. I ...
0
votes
0answers
7 views

Picking a model to go ahead with for a WGAN

I have been trying to train a model using WGAN loss functions, working different learning rates to choose my hyper parameters based on advice. I was told to try looking into keeping everything simple ...
0
votes
1answer
18 views

LSTM loss value not change, accuracy stucked at 50%

I'm using LSTM for time series prediction, my data is highly skewed, with class weight 197.16865807 : 0.50127117 With ...
0
votes
2answers
23 views

How to extract the reason behind a prediction using TensorFlow?

I created a CNN using TensorFlow2 and trained it as a binary classifier. Is there a way to extract the influence of each pixel upon the prediction? I am trying to obtain a mask similar to the ...
0
votes
1answer
21 views

Conv1D specify output chanels in tensorflow 2.1

Hello I'm trying to implement the "Tacotron Towards end to end" paper and in the Encoder CBHG - a Conv1D bank of K=16, conv-k-128-ReLU “conv-k-c-ReLU” - denotes 1-D ...
0
votes
0answers
11 views

Error when trying Transfer Learning

I'm trying to train a model which is an extension of Google's Inception-V3 for the purpose of recognizing and classifying whether there is any pneumonia using x-ray images. I've used Tensorflow-Hub ...
0
votes
0answers
8 views

Attention model with seq2seq over sequence

On the official tensorflow page there is one exmple of a decoder (https://www.tensorflow.org/tutorials/text/nmt_with_attention#next_steps): ...
1
vote
0answers
28 views

Is the “training loop” used in AlphaGo Zero the same as an “epoch”?

I am confused about the training stage of AlphaGo Zero using the data collected from the selfplay stage. According to an AlphaGo Zero Cheat Sheet I found, the training routine is: Loop from 1 to 1,...
0
votes
1answer
21 views

Tensorflow CNN not predicting correctly for a well trained model

So I have built a CNN and trained it to around 95% accuracy on training data, and 90% on testing data. The issue is, when I save this model, load it in again, and predict, it always predicts 1 or ...
1
vote
0answers
17 views

Difference between tf.keras.backend.one_hot and keras.utils.to_categorical

I'm working on a classification project and need to do one hot encoding on my data set. I'm just wondering what is the difference between tf.keras.backend.one_hot ...
0
votes
0answers
18 views

Set params to keras estimator model

I started with tensorflow 2 days ago and I am trying to set the hyperparameters with model_to_estimator. However, I cannot figure out how. As it is, the model can ...
0
votes
0answers
32 views

Jupyter Notebook stuck on loading without giving any output

I've recently trained a model which has achieved 99% accuracy on training and 96% on validation data. It is a model which uses images to successfully distinguishes between 120 classes of fruits. I've ...
1
vote
1answer
21 views

What is neural structure learning in tensorflow?

What is neural structure learning? what is the difference between neural network vs neural structure learning?
1
vote
0answers
14 views

What is regularization in machine learning? [closed]

What is regularization in machine learning? Why do we need this in machine learning?
0
votes
1answer
32 views

What is Quantum Convolutional Neural Network?

I just came through the TensorFlow Quantum library they introduced Quantum Convolutional Neural Network. What is Quantum Convolutional Neural Network? What is the difference between CNN vs QCNN?
0
votes
1answer
43 views

what is Tensorflow Quantum(TFQ)?

Google announced a new open-source library called TensorFlow Quantum(TFQ) so I am curious to know about Tensorflow quantum. what is TensorFlow Quantum? How it is useful with an existing TensorFlow ...
0
votes
1answer
24 views

Why does accuracy improve when vocabulary size of word embedding model is reduced?

I am quite new to the topic of word embedding using word2vec and models such as skip-gram. Our teacher introduced us to this TensorFlow code on word2vec which he ran on Google Colab notebook. He ...
0
votes
0answers
17 views

Calculating Top k Text prediction using Tensorflow

I would like to adapt the code of PTB Tensorflow code [https://github.com/tensorflow/models/blob/master/tutorials/rnn/ptb/ptb_word_lm.py], in order to calculate top k predicted word samples, on the ...
0
votes
1answer
13 views

ImageDataGenerator for multi task output in Keras using flow_from_directory

I am creating a multitask CNN model and I have two different classification properties (one with 10 classes, 2nd with 5 classes) and my directory structure looks like this: ...
0
votes
1answer
20 views

An error coming out when fitting a model with keras

I am trying to build a model using kerras but for some reason I receive a ...
0
votes
1answer
18 views

NN Model accuracy and loss is not changing with the epochs!

I am building a tensorflow model for Heart Disease Prediction data-set. It has a binary outcome (0, 1). Though I am struck with such a low accuracy which is not changing with epochs. ...
0
votes
1answer
25 views

Is this a case of overfitting?

I am training a CNN-LSTM-FC network with around 1 Million parameters network for spatial time series prediction but the validation loss does not even come close to the training loss after 1-2 epochs. ...
0
votes
1answer
28 views

Multi-class classification with discrete output: Which loss function and activation to choose?

I'm working with a multi-class classification problem, using Keras Sequential models. In my dataset, the output class has one of the following values: ...
-2
votes
1answer
31 views

Bald detection using Keras

I am new to machine learning and I was wondering if anyone can help by providing me with some guidelines for creating a bald-or-not image classifier, The main problem I can foresee is finding a ...
0
votes
0answers
37 views

l2-regularized regression in keras

I just started with Keras/Tensorflow and I am trying to reproduce results from one paper, where authors minimized the following loss function \begin{align} \min_{w \in R^d} \frac{1}{n} \sum_{i \in [n]}...
0
votes
0answers
8 views

Resetting trainable variables to random/default in a Tensorflow session

I am working on an experimental approach to text classification for which I need to use pure Tensorflow (no Keras). As I am implementing Leave-One-Out CV, I need to reset (or reinitialize, call it as ...
0
votes
0answers
12 views

Use tensor shape for slicing

I'm trying to write a custom metric for early stopping in which I exclude the highest 5% of points from MSE computation. The code looks as follows: ...
1
vote
2answers
61 views

Do I need to convert strings before using LSTM?

I have a dataset which includes one column with a URL and another column with value 0 or 1 indicating if it is a phishing link. I want to process this dataset using LSTM. Do I need to first convert ...
0
votes
1answer
39 views

Custom keras dataset generator not accepted by fit_generator

I've got a problem trying to use generators in Keras. I've got TensorFlow 2.1 with Python 3.7. I'm using the Keras version bundled with TensorFlow I have defined a class for my generator derived from ...
1
vote
1answer
75 views

How to load a saved model in TensorFlow?

This is my code in Python: ...

1
2 3 4 5
27