Questions tagged [tensorflow]

For questions related to Google's open-source library for machine learning and machine intelligence. However, note that programming questions are off-topic here.

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

what is meant by this line “OOM when allocating tensor with shape[1,160,160,4] ” [closed]

I was training the double DQN agent to play atari breakout along with experience replay(deque) of size 5000. It started randomly but after reaching episode 64 kernel died automatically. Jupyter ...
1
vote
0answers
15 views

Layer dense expects 1 input(s), but it received 2 input tensors, how do I change that [migrated]

So I am a beginner, just approaching tensorflow2 and keras, I was just playing around and trying to make some models when i stumbled across the following error: ...
0
votes
1answer
21 views

How to construct input dependent convolutional filter?

I am constructing a convolutional variational autoencoder for images, starting out with mnist digits. Typically I would specify convolutional layers in the following way: ...
0
votes
0answers
8 views

What is the difference between TimeDistributed CNN+RNN and passing sequence of features to RNN

I found Keras API that allows to add additional time dimension. ...
1
vote
2answers
37 views

Extract features with CNN and pass as sequence to RNN

I read an article about captioning videos https://blog.coast.ai/five-video-classification-methods-implemented-in-keras-and-tensorflow-99cad29cc0b5 and I want to use solution number 4 (extract features ...
0
votes
0answers
39 views

How to input a given sequence to a transformer (or an RNN) with probability of occurrence?

I'm experimenting with music and transformers, and I have sequences $S$ of shape: $(B,L,N)$ where $B$ is the batch size, $L$ is the sequence length, and $N=12$ are the number of musical notes with ...
1
vote
1answer
46 views

How to calculate the GPU memory need to run a deep learning network?

In general, how do I calculate the GPU memory need to run a deep learning network? I'm asking this question because my training for some network configuration is getting out of memory. If the ...
0
votes
1answer
121 views

How to handle a changing in the Reinforcement Learning environment where there is increasing or decreasing in number of agents?

I'm working in A2C and I have an environment where there is increasing or decreasing in the number of agents. The action space in the environment will not change but the state will change when new ...
0
votes
0answers
11 views

Working of embedding layer in Tensorflow [migrated]

Can someone please explain me the inputs and outputs along with the working of the layer mentioned below ...
1
vote
1answer
26 views

Why is the convolution layer called Conv2D?

When I build a convolution layer for image processing, the filter parameters should have 3 dimensions, (filter_length, filter_width, color_depth) is that correct? ...
0
votes
0answers
24 views

How can I create a network that takes a single digit as an input and outputs a 2D array? [migrated]

I want to create a network that can take a single digit (float) and then output a 2D array. I'm using TensorFlow in Python and so far I have this for my model and training. ...
2
votes
2answers
28 views

How to take the optimal batch_size for training a model?

I have an image dataset, which is composed of 113695 images for training and 28424 images for validation. Now, when I use ImageDataGenerator and ...
0
votes
0answers
14 views

What modifications do I need to make to an Image for YOLO recognition

I'm trying to get some TensorFlow on Android code working that is using a model from a Model Zoo. One of the models in the zoo is YOLOV2 (link). But when I pass the model an image I'm getting back ...
0
votes
0answers
20 views

Faster RCNN-RPN Network Training

I am trying to understand RPN network in Faster RCNN. I understand the concept of RPN network, Pass the input images to the pre trained CNN, and get the output as feature maps Make fixed size of the ...
2
votes
0answers
64 views

Doing backpropagation in an Tensorflow.js Neural Network

I have a neural network (which I am making from scratch). In order to make the neural network "learn" I need to conduct back-propagation. Using the code at the below how would I conduct back-...
1
vote
0answers
17 views

Keras model accuracy not improving beyond threshold

I am currently working on a public project for the National Weather Model. We are experimenting with using a recurrent neural network to replace the output of a quadratic formula that is in use. The ...
0
votes
1answer
73 views

How to train an LSTM with varying length input?

I have a dataset where each of the training instances is different in the length and the data is sequential. So, I design an LSTM but I am thinking about how to train the LSTM. In fixed-length data, ...
1
vote
0answers
58 views

How large should the corpus be to optimally retrain the GPT-2 model?

I just started working with the GPT-2 models and want to retrain one on a pretty narrow topic, so I have problems finding training material. How large should the corpus be to optimally retrain the GPT-...
0
votes
0answers
51 views

What are some scalable approaches to perform anomaly detection (for images with small cracks) with unsupervised learning?

I have some images with anomalies, like small cracks, but it's an imbalanced dataset. Please, suggest some effective scalable approaches. Should I consider convolutional auto-encoders? It's supposed ...
1
vote
0answers
48 views

Embedding Layer into Convolution Layer

I'm looking to encode PDF documents for deep learning such that an image representation of the PDF refers to word embeddings instead of graphic data So I've indexed a relatively small vocabulary (88 ...
2
votes
0answers
117 views

Why is DDPG not learning and it does not converge?

I have used a different setting, but DDPG is not learning and it does not converge. I have used these codes 1,2, and 3 and I used different optimizers, activation functions, and learning rate but ...
0
votes
0answers
35 views

How to define image as observation in tensorflow_agent?

I want to use the DQN algorithm from TensorFlow Agent API for a custom environment. In my environment, the agent's observations are image sequences. As far as I know, images should be encoded by a ...
0
votes
0answers
37 views

Micro average f1_score, None average f1_score cannot increase more than 0.71, 0.50 respectively for the best model estimator

I am training a multilabel text neural network and the model metric I chose, to measure the performance of the training and the validation sets, is the f1 score (Micro average, None average). However, ...
0
votes
0answers
36 views

CIFAR-10 can't get above 10% Accuracy with MobileNet, VGG16 and ResNet on Keras

I'm trying to train the most popular Models (mobileNet, VGG16, ResNet...) with the CIFAR10-dataset but the accuracy can't get above 9,9%. I want to do that with the completely model (include_top=True) ...
0
votes
2answers
112 views

Practical skills in AI

For the past month I have been studying machine/deep learning, thus I have completed both the machine learning course and the deep learning specialization by Prof. Andrew Ng on coursera. In these ...
0
votes
0answers
44 views

Why is my DDPG agent (implemented in TensorFlow) not learning?

I am trying to implement a Reinforcement Learning algorithm called DDPG in TensorFlow 2.x on a custom gym environment. I am new to TF. So, I started with the DDPG TF 1.x implementation from pemami4911....
0
votes
0answers
37 views

DQN not learning the game Pong

Hello I'm trying to implement DQN Agent to play Atari-Pong game. But still after 500.000 parameter updates, the model still scores -21. This is my code, do you have any idea what could be wrong? ...
0
votes
0answers
26 views

How much data do we need for making a successful de-noising auto-encoder?

Is there a guide how much data do you need for making successful denoising model using autoencoders? Or the rule is, the more data, the better it is? I tried with small dataset 350 samples, to see ...
0
votes
0answers
42 views

Computer vision and deep learning with a small number of training images

I am using computer-vision for detecting objects on the measuring table. In my tests, I used two techniques/frameworks: semantic segmentation (framework TensorFlow) and object recognition (framework ...
2
votes
2answers
56 views

How can I have the same input and output shape in an auto-encoder?

I'm building a denoising autoencoder. I want to have the same input and output shape image. This is my architecture: ...
0
votes
0answers
35 views

Using deep deterministic policy gradient in OpenAI Gym to solve problems with continuous actions

I am trying to do the following: Install the OpenAI baseline algorithms from the following GitHub repository: github.com/openai/baselines by following the instructions in the readme file. Train an ...
0
votes
1answer
68 views

Soft Actor Critic - Losses are not converging

I'm trying to implement soft actor-critic algorithm for financial data (stock prices) and I have trouble with losses, no matter what combination of HyperParameters I enter, they are not converging, ...
1
vote
0answers
40 views

How to compare SegNet, U-Net and EfficientNet?

SegNet and U-Net are created for segmentation problem and EfficientNet is created for classification problem. I have a task and it is saying that train these models on the same dataset and compare ...
0
votes
0answers
16 views

Studying the speech-generation model and have question about the confusing nature of model input and outputs

I am currently studying this model speech generation known as WaveNet model by Google. https://arxiv.org/pdf/1609.03499.pdf using the linked original paper and this implementation. I find the model ...
0
votes
0answers
37 views

How GAN generator produce integer RGB colored picture?

For traditional neural networks, I know that we can't constraint the output to be strict integers. My question is what technique does GANs use to produce integer outputs, that can be then converted to ...
0
votes
0answers
28 views

How can I build a model that replaces a feature of one image with another feature?

I would like to build a neural network (using TensorFlow) that is able to take two animals, and replace a feature in the second with one in the first. For example, if given a dog and cat, the cat's ...
0
votes
0answers
16 views

Identifying and Labeling multiple letters in image

While I attempt to learn AI/ML I have taken on the task to create a Boggle solver. The idea is that a system could take an image of a Boggle arrangement of letters and identify the letters (and the ...
1
vote
0answers
33 views

Incorporating domain knowledge into recurrent network

I am currently trying to solve a classification task with a recurrent artificial neural network (RNN). Situation There are up to 350 inputs (X) mapped on one categorical output (y)(13 differnt ...
1
vote
0answers
24 views

Low accuracy during training for text summarization

I am trying to implement an extractive text summarization model. I am using keras and tensorflow. I have used bert sentence embeddings and the embeddings are fed into an LSTM layer and then to a Dense ...
1
vote
0answers
27 views

How to use one-hot encoding for multiple columns (multi-class) with varying number of labels in each class?

I am a beginner in TensorFlow as well as in AI. I am basically from Pharma background and learning AI from scratch. I have data with 5038 input (Float64) and 826 output (Categorical - Multi Labels in ...
1
vote
0answers
37 views

How can I perform policy update in python? [closed]

I'm using Python and tensorflow to implement a Deep Q-learning with experience replay in a continous action and state spaces and I have used two neural networks to approximate both the policy function ...
1
vote
1answer
88 views

How do you manage negative rewards in policy gradient reinforcement learning?

The same basic question here, but 3 years old and no definitive answer: Negative reward (penalty) in policy gradient reinforcement learning The question is, if I'm doing policy gradient in keras, ...
1
vote
0answers
24 views

Trying to Train Cards Game with RL

I am trying to train a card game called Callbreak I tried inputs like all the opponents discarded cards all hands everything a human can see and calculate with "common sense" I fed it to the Agent but ...
0
votes
2answers
102 views

How to implement AI strategy for Mastermind

I'm looking to implement a AI for the turn-based game Mastermind in Node.JS, using Google's Tensorflow library. Basically the AI needs to predict the 4D input for the optimal 2D output ...
0
votes
0answers
25 views

How does multiple outputs added from intermediate layers of a keras functional model influence its learning behaviour / gradients?

let us assume I have a keras functional model with 2 inputs. My model has two branchs, each branch for each input. The model only uses dense layers. The first input is the data itself (feature vector ...
3
votes
0answers
53 views

Understanding the TensorFlow implementation of the policy gradient method

I was trying to understand the implementation of a basic policy gradient (REINFORCE) method using TensorFlow. I think I got almost everything. The only thing that still bothers me is the loss function ...
0
votes
0answers
45 views

Can neural networks handle redundant inputs?

I have a fully connected neural network with the following number of neurons in each layer [4, 20, 20, 20, ..., 1]. I am using TensorFlow and the 4 real-valued ...
1
vote
0answers
26 views

Why does this tutorial on reinforced learning not check whether the environment is 'game over' during training?

I am following the tutorial Train a Deep Q Network with TF-Agents. It uses the hello world environment of reinforced learning: cart pole. At the end, the agent is ...
0
votes
0answers
20 views

Gradients null for actor in Acton-Value actor-critic

I'm trying to implement a simple actor-critic algorithm based on action-value critic. I'm following the pseudocode from David Silver (please find attached his slide) ...

1
2 3 4 5 6