2022 Developer Survey is open! Take survey.

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

How to Create Sparse Dense Layer in QKeras? [closed]

I am trying to create two dense layers using qkeras. Qkeras is a python library like Keras but it provides quantized layers. I want to connect some of the neurons of layer 2 connected to the neurons ...
user avatar
0 votes
0 answers
12 views

What happens in tensorflow/pytorch under the hood when doing a convolution2d() with x filters when num input feature maps/channels > x? [duplicate]

I was wondering about what happens in tensorflow/pytorch under the hood when doing a convolution2d() with x filters when num input feature maps/channels > x? e.g. my input shape with 129 feature ...
user avatar
-1 votes
0 answers
24 views

Custom Tensorflow RL API for External Environment

Hi everyone and sorry for the long question, I am trying to solve an environment that has no simulation and cannot be interacted with, but it can consume web service. so my current design for the RL ...
user avatar
  • 1
0 votes
0 answers
17 views

Could I cluster the audio clips in order to improve the speed of their classification?

I have a neural network which is very resource intensive and is used to classify audio clips. The classification is done in batches, where I record for a set period of time and then go through and ...
user avatar
  • 101
0 votes
0 answers
22 views

Keras model can't process anything but 600 by 400 images, even though it's not trained on them [closed]

I'm trying to train an AI to correct image colors. But can anyone tell me why this model is limited to processing 600 by 400 images? It can train on any resolution images i want to give it (currently ...
user avatar
0 votes
0 answers
16 views

Loading keras model using classes in different script [closed]

What is wrong here: I can't seem to import a model into a different script using custom_objects (Using keras and tensorflow btw) I'm trying to do this, as I'd like to use the trained model, for some ...
user avatar
0 votes
0 answers
7 views

Is there a way to retain the environment order/sequence of generated observations in the driver and replay buffer

I am using the tf_agents for contextual bandit algorithm. My data is at userlevel and hence very important to make sure that actions and rewards (and trajectories in order to train on them) are ...
user avatar
  • 111
0 votes
0 answers
27 views

What is the correct formula for the loss function?

I have used the Delayed sin echo prediction with Tensorflow that predicts the sin wave. However, I'm not sure of the correct formula for the loss function. The problem is that I feed the training ...
user avatar
1 vote
1 answer
35 views

How to handled delayed rewards in contextual bandits [closed]

All the examples I see in the tf_Agents for contextual bandits, involves a reward function we generated the reward instantly after an observation has been generated. But, in my real world usecase (say ...
user avatar
  • 111
-1 votes
1 answer
111 views

can't find a viable import class for keras.utils.Sequence [closed]

I am using Google Colab. tensorflow version = 2.8.0, and keras is the same. I am trying to get a BalancedDataGenerator(Sequence) class created, but I can't get <...
user avatar
0 votes
0 answers
13 views

Convolutional network for multilabel classification in NLP

I am trying to label code snippets and I base on this article: https://arxiv.org/pdf/1906.01032.pdf My dataset is just code snippets (tokenized as ascii characters) and 500 different labels from ...
user avatar
0 votes
0 answers
18 views

How to choose the best RL algorithm for a 10x5 action space?

I have RL problem statement where I am training a bot to observe a 350x10x10 matrix and expect a 10x5 action vector The observation space is sort of a time series ...
user avatar
0 votes
2 answers
34 views

Overfitting problem - poor performance on test data

I'm facing the problem of overfitting and I can't deal with it - I tried experimenting with optimizer, but nothing seems appropriate. My model has extremely poor performance on testing data and the ...
user avatar
  • 1
0 votes
0 answers
11 views

Can you use both copy mechanism and BPE?

I read to alleviate the problem of Out of Vocabulary (OOV), there are two techniques: BPE Copy mechanism It appears to me they are two orthogonal approaches. Can we combine the two, i.e., we use ...
user avatar
0 votes
1 answer
70 views

Which approach can I use to generate forged signatures from real ones?

I am in internship period and I'm working on a signature verification problem. This process needs real and forged signatures. All I have are the real signatures (like 30 signatures per person), and I ...
user avatar
0 votes
0 answers
17 views

How can I find the factor contributing to a prediction? [duplicate]

I've developed a neural network which predicts if someone is diagnosed with cardiovascular disease. Is it possible to find out which feature is the main cause of the prediction? For example, when a ...
user avatar
  • 1
0 votes
1 answer
60 views

Where can I find authentic references on "categorical cross entropy" and "categorical accuracy metric"?

My Python source code uses TensorFlow and Keras to implement a neural network. The Keras source code uses something called "categorical cross-entropy" and "categorical accuracy metric&...
user avatar
0 votes
1 answer
329 views

How to encode actions for training a Wordle agent?

I'm trying to train an AI using reinforcement learning to play the game Wordle. The way the game works is that there is a secret five letter code word that you need to guess, and every time you guess ...
user avatar
1 vote
1 answer
24 views

Additional Optimizations for Convolutional Models On Inferencing

I am aware of several ways to optimize a convolutional (or any) model after training to make inferencing quicker. I am currently implementing BatchNormalization Folding and removing Dropout layers ...
user avatar
0 votes
1 answer
36 views

What techniques exist to increase the learning importance of difficult-to-learn labels over easy ones?

I am training a model to place labels in image data. Some labels are learnt very quickly by the model while others take a long time to perfect. I cannot simply add more labeled data with only the ...
user avatar
0 votes
0 answers
33 views

Which algorithms work in a non-stationary stochastic environment?

Currently, I am reading into the Multi-Armed-Bandit problem and found the special case of non-stationary (environment and its attributes, like the reward distribution, change over time) stochastic ...
user avatar
0 votes
0 answers
25 views

What is the role of the observation in the standard Multi-Armed-Bandit?

I'm trying to understand how to model the environment for a MAB problem. I'm following the TensorFlow tutorial on it. In the Introduction and Environment chapter is stated: agents do not model state ...
user avatar
-2 votes
1 answer
48 views

My accuracy wont improve in tensorflow [closed]

I've been trying to figure out why this model won't train (the accuracy stays at 0). ...
user avatar
  • 125
1 vote
2 answers
284 views

Are these book example CNN results realistic?

I've been following a deep learning book and the current section I'm on is about convolutional neural networks. The author presents some code to create a basic CNN with about 1 million parameters, ...
user avatar
  • 21
0 votes
1 answer
110 views

Can anyone please explain TFLite quantization part found in Netron neural network viewer?

I was checking tflite file in Netron. There I found the quantization formula in Netron as below: quantization: 0.007709330413490534 * (q + 3) I know the ...
user avatar
  • 19
0 votes
2 answers
72 views

How do sine and cosine transforms help in extracting frequencies in time series forecasting models?

I'm trying to learn how time series forecasting models work and while reading a tutorial off the TensorFlow website I came across these algorithms. I don't quite understand what the article means by &...
user avatar
1 vote
0 answers
22 views

Why Acme is using own uniform initializer?

Why is Acme using own initializer for both tanh and ELU, when commonly used for tanh is Xavier and for ELU is He initializer? What mathematics is behind them? Here is the code. ...
user avatar
3 votes
1 answer
52 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 ...
user avatar
  • 33
1 vote
1 answer
63 views

Triplet Loss- Three forward pass and one backward pass(Propagation)

I am trying to build a CNN model based on the concepts of Contrastive Learning. In specific based on Triplet loss. I have 5 different class labels and I create triplets such that in a triplet, two ...
user avatar
0 votes
0 answers
50 views

Why is the simplest U-Net architecture giving the best (but not good enough) results on a multi-class segmentation on microscopic data?

Currently, I'm trying to optimize a training process of a neural net to improve final results. The problem I'm dealing with is multiclass segmentation on microscopic data. The paradox is that the best ...
user avatar
  • 11
0 votes
0 answers
18 views

In general, when are the normal, uniform and zero initializers used?

I came across a Conv2D layer in a fully convolutional network, which used a kernel_initializer='zero' for regression. Why is a ...
user avatar
0 votes
0 answers
38 views

Object detection: when there's only 1 object in each image

Good day. I have a custom dataset for object detection, which has imbalance that each image has only one object annotation. I trained the object detection model(Efficientdet-dx) on TensorFlow object ...
user avatar
  • 1
0 votes
0 answers
106 views

Why is val accuracy 100% within 2 epochs and incorrectly predicting new images? (1,000 images per class when training)

My CNN tensorflow model reports 100% validation accuracy within 2 epochs. But it incorrectly predicts on single new images. (It is multiclass problem. I have 3 classes). How to resolve this? Can you ...
user avatar
0 votes
0 answers
110 views

tfp.Distributions.Categorical.sample() is picking the same action everytime after certain iterations

I have written a code for an RL agent such that at each state the model calculates the probabilities of all possible actions and samples one action randomly to proceed further. To acheive this, I have ...
user avatar
0 votes
0 answers
33 views

Why am I getting a very small number as CNN prediction?

I created a CNN using Tensorflow to identify pneumonia and sometimes it returns a very small number as a prediction. why is this happening? I have attached the link for the dataset Here I how I ...
user avatar
0 votes
1 answer
638 views

How to fine-tune GPT-J with small dataset

I have followed this guide as closely as possible: https://github.com/kingoflolz/mesh-transformer-jax I'm trying to fine-tune GPT-J with a small dataset of ~500 lines: ...
user avatar
0 votes
0 answers
19 views

Training the Model properly

I am relatively new to Machine Learning. I want to build a good stock price prediction neural network model and I am using features that depend on the price as well as features that do not depend on ...
user avatar
0 votes
0 answers
55 views

Is the graph considered as overfit?

I have a training dataset of 2000 images and 500 images for validation. I have executed 50 epochs, however I realized that my graph seems to be different as my accuracy is smaller than my loss. I am ...
user avatar
  • 1
1 vote
0 answers
46 views

Hand Landmark Detector Not Converging

I'm currently trying to train a custom model with TensorFlow to detect 17 landmarks/keypoints on each of 2 hands shown in an image (fingertips, first knuckles, bottom knuckles, wrist, and palm), for ...
user avatar
0 votes
0 answers
18 views

Categorical Location based Time Series data Prediction using LSTMs

I have some time series data with ActivityType as location shared below. Each CaseID has 6 unique values with different ...
user avatar
0 votes
0 answers
27 views

Training a neural network using several data sources with quality flags

I have been searching for a specific problem in training a NN and hope someone is able and willing to help as I cannot find a solution. The problems is that I have a spatial data set with 3 sources of ...
user avatar
1 vote
1 answer
78 views

What could cause the hamming loss and subset accuracy to get stuck in a multi-label image classification problem?

I am rather new to deep learning and got some questions on performing a multi-label image classification task with keras convolutional neural networks. Those are mainly referring to evaluating keras ...
user avatar
  • 11
0 votes
0 answers
60 views

Data Augmentation for Object Detection - Polygon Region Shape

I'm looking to run a Mask RCNN code on my dataset of about 2700 images. The images are too large and I would like to resize them, and I would also like to add some shear, scale and zoom augmentations. ...
user avatar
0 votes
0 answers
67 views

Multiple GRU layers to improve a text generation

I am using the model in this colab https://colab.research.google.com/github/tensorflow/text/blob/master/docs/tutorials/text_generation.ipynb#scrollTo=AM2Uma_-yVIq for Shakespeare like text generation. ...
user avatar
  • 101
0 votes
1 answer
35 views

How to handle random order of inputs and get same output?

I am a beginner with DL. I did some tutorials and I know the basics of TensorFlow. But I have a problem understanding how to construct more advanced NNs. Let's say I have 6 inputs and a list of 500 ...
user avatar
0 votes
1 answer
377 views

What is better to use: early stopping, model checkpoint or both?

I want to get a model which works best, what should I go for while training the model, ModelCheckpoint, EarlyStopping, or both?
user avatar
1 vote
1 answer
333 views

Tensorflow object detection model total loss starts out good, but suddenly explodes up to high loss numbers

I'm training a Tensorflow object detection model with approx. 7500 images of two classes, which contains approx. 10,000 classes per class. I'm using Tensorflow 2.6.0, in case that is relavent. I am ...
user avatar
  • 119
0 votes
1 answer
59 views

How to handle an unbalanced dataset when training object detection algorithms?

I am training an object detection model, and I have some very highly unbalanced data annotations. I have almost 11,000 images, all with dimensions of 1024 $\times$ 1024. Within those images I have the ...
user avatar
  • 119
0 votes
1 answer
47 views

Do LSTM in tensorflow work sequentially or in parallel

I have a basic understanding how a cell and a layer of an LSTM works. However, I get confused by what "number of units" (as termed in tensorflow) exactly means. A unit is, as far as I ...
user avatar
0 votes
1 answer
295 views

Transformer model is very slow and doesn't predict well

I created my first transformer model, after having worked so far with LSTMs. I created it for multivariate time series predictions - I have 10 different meteorological features (temperature, humidity, ...
user avatar
  • 103

1
2 3 4 5
7