Questions tagged [tensorflow]
A Python library for deep learning developed by Google. Use this tag for any on-topic question that (a) involves tensorflow either as a critical part of the question or expected answer, & (b) is not just about how to use tensorflow.
248
questions with no upvoted or accepted answers
5
votes
0
answers
1k
views
Using `relu` as activation function for regression with only positive values
I'm building a deep learning model to predict times of arrival. By definition, the time of arrival is always positive. I'm wondering if I can use a relu as the ...
5
votes
1
answer
2k
views
Training batch size in relation to number of classes in a neural network
I'm using Keras on top of Theano for neural network training.
What should be my batch size in relation to the number of classes? I have 560 classes and if I use a batch size more than 128, I can't ...
4
votes
0
answers
227
views
Fine-tune: ways to determine how many layers to unfreeze
How to determine amount of layers I should unfreeze while fine-tuning deep learning model? Is there any sets of rules or I should just experiment?
4
votes
1
answer
561
views
correcting for extremely downsampled data: keras class_weight is hurting my model
I have an extremely imbalanced dataset (millions of times more negatives) for a binary classification NN model. I am aggressively downsampling solely for the purpose of making training time manageable,...
4
votes
0
answers
570
views
A2C in TensorFlow 2 using model with two heads
I am implementing some of the basic reinforcement learning algorithms but ran into a problem with an online (one-step TD) A2C implementation where my reward seems to decrease over time instead of ...
4
votes
1
answer
528
views
custom loss function to optimize payoff via binary decision
I have written a custom loss function that is supposed to optimize a payoff via a binary decision. However, the neural networks is struggling to convert, and I'm suspecting that there's something ...
4
votes
0
answers
3k
views
Transfer learning on faster rcnn and tensorflow
I am trying to do transfer learning to reuse a pretrained neural net. I got the tensorflow faster rcnn official example to work, and now i would like to reuse it to detect my own classes.
This is the ...
4
votes
0
answers
555
views
Dropout causes overfitting
I am trying to experiment with dropout in 2 layer NN on notMNIST dataset using TensorFlow (assignment 3 in Google Deep Learning Course on Udacity). But adding dropout causes fall in test accuracy and ...
4
votes
0
answers
529
views
TensorFlow Deep MNIST for Experts tutorial: kernels seem to never learn anything
I'm following Google's TensorFlow Deep MNIST for Experts tutorial.
Here is my code:
http://pastebin.com/ePktssrn
The networks seems to get close to 100% accuracy after about training 1000 steps, ...
4
votes
0
answers
1k
views
Multivariate regression in Tensorflow where dependent variables also depend on each other
Dear Stackoverflow community,
I would like to understand how to implement a multivariate regression in Tensorflow, where all the dependent variables yn depend on both input variables xn as well as ...
3
votes
0
answers
199
views
Designing an ML model for solving nonograms
The Problem
I am trying to create a model to solve nonograms. I want to solve nonograms of any size $N\times N$ where $ \mathbb{N} \ni N\leq 10$. (but actualy I will be happy with a fixed size for ...
3
votes
0
answers
375
views
High resolution in style transfer
I'm investigating a bit about neural style transfer and its practical applications and I've encountered a major issue. Are there methods for high resolution style transfer? I mean, the original Gatys' ...
3
votes
0
answers
555
views
What are good values for sample weights for UNet?
I'm trying to implement U-Net (https://arxiv.org/abs/1505.04597) from scratch using Keras.
The thing about UNet apart from its architecture, is that it's using weight-maps from the input images in the ...
3
votes
1
answer
349
views
Application of Wavelet Transform and Differencing on Time Series Data (to denoise and remove seasonal adjustment and other trends)
I am working on an LSTM model to predict time series data (stock prices) and I would like an opinion whether to denoise my data or not before feeding it into the model.
According to Investopedia, ...
3
votes
1
answer
77
views
Which machine learning model could be used for the following?
I am an experienced programmer but very new to machine learning.
I have a data set that consists of about 50,000 sets of 2,000 ordered values. All of the values are floats normalised to between 0 and ...
3
votes
0
answers
3k
views
Why Massive Random Spikes of Validation Loss?
My problem is to estimate the length of a straight line in an image, in pixel.
My training size is 6000 images, validation is 1000 images. Each image has 200 x 200 pixels. My data is generated using ...
3
votes
0
answers
495
views
How to reduce impact of false positive images in Tensorflow Object Detection Framework?
I am training a single object detector(for car) with Faster R-CNN with Inception v2 config file. I started with around 300 examples of images of the object with bounding boxes and trained that, got ...
3
votes
0
answers
378
views
Recognition the same object from different views
I have 33 classes (33 different objects). I need to recognize the object from any view of the object. Like a packet of potato chips, the packet has different appearance from different view (as shown ...
3
votes
0
answers
626
views
How to write loss function for variational autoencoder?
So I've trying to follow various resources (Geron, Doersch, Altesaar, et al.) to construct a working loss function for my variational autoencoder but I'm finding that formulations either seem to work ...
3
votes
0
answers
1k
views
input image size for deep learinng models
i have two set of images. One of size 120*60 and other of size 1022*81. Most of the deep learning models require size 224*224 or some other standard dimension as an input. Can i put these images ...
3
votes
0
answers
220
views
Is my weight matrix *learning* from all the steps in my LSTM?
I'm attempting to build an LSTM in Tensorflow to take in a series of amino acids (represented as Bitfields) and output a series of Torsion angles (4 numbers ranging from -1 to 1) for each amino acid ...
2
votes
0
answers
2k
views
Choosing the 'best' epoch to stop the training of neural network. Top accuracy not improving, but average is
I'm familiar with concepts like early stopping, and detection of plateau and so on.
Tensorflow CNN training has a possibility of saving only best model too, according to model's accuracy metric (for ...
2
votes
0
answers
106
views
Why an agent can't learn on cheat data?
I want to train a FinRL model which will trade on an exchange using Ray Tune.
I tried two different tune runs: with future data(you can find this code by "#Future data") and without. I ...
2
votes
0
answers
74
views
Strange behaviour of training accuracy and loss function
Firstly, I want to mention that I am not looking for suggestions to improve the training accuracy of my NN. The only purpose of this question is to know what might be causing the peculiar behaviour ...
2
votes
0
answers
126
views
Vertical Federated Learning
Lately I have been working (mostly reading) on Federated Learning and the one type of federation that looks suitable for my case is the Vertical Federated Learning. You can read about it here. Briefly,...
2
votes
0
answers
148
views
Gradient exploding problem in a graph neural network
I have a gradient exploding problem which I couldn't solve after trying for several days. I implemented a custom message passing graph neural network in tensorflow which is used to predict a ...
2
votes
1
answer
285
views
How to deal with negative rewards in policy gradient with crossentropy loss
In policy gradient reinforcement learning we can use a loss function of the form -log(P)*reward, where P is the probability of ...
2
votes
0
answers
470
views
Finding the best weights for sparse categorical cross entropy loss
In semantic segmentation and similar applications, sparse categorical cross entropy is often used as a loss function. Now it usually happens that samples are imbalanced. In my case, I have one class ...
2
votes
0
answers
375
views
Actionability from Tensorboard's weight histograms?
There are a few questions across the site about how to interpret the weight histograms. I understand what the histogram is showing, but:
What exactly does it mean when the weights in a given layer ...
2
votes
0
answers
1k
views
Implementing Multiclass Dice Loss Function
I am doing multi class segmentation using UNet. My output from the model is,
...
2
votes
0
answers
116
views
LSTM architecture for anomaly detection
I'm testing out different implementation of LSTM autoencoder on anomaly detection on 2D input.
My question is not about the code itself but about understanding the underlying behavior of each network.
...
2
votes
0
answers
54
views
Machine-learning regression coefficients
Say I want to do supervised learning of response variable $y_k$ (continuous) and feature variables $(x_k, z_k, a_k, b_k)$ where $k$ is the sample index.
Instead of learning the general form
$$ y \sim ...
2
votes
0
answers
741
views
Gamma Regression as the Last Layer of the Neural Network
My current task involves predicting data that follows a Gamma distribution. To avoid confusion of notations, in the following discussion, the p.d.f will be $$\mathbb{P}(y|\alpha, \beta)=\frac{\beta^\...
2
votes
0
answers
865
views
Resize images before training object detection
I am training an object detector. I didn't resize my image before labeling because the of assumption that the model does this automatically to fit its input shape.
...
2
votes
1
answer
276
views
Masked Autoencoder MADE implementation in TensorFlow vs Pytorch
I am following the course CS294-158 [1] and got stuck with the first exercise that requests to implement the MADE paper (see here [2]). My implementation in TensorFlow [3] achieves results that are ...
2
votes
1
answer
50
views
Which is the error of a value corresponding to the maximum of a function?
This is my problem: I use data observed with MUSE (which is an astronomical instrument provides cubes, i.e. an image for each wavelength with a certain range, link
) to extract a measure of redshift. ...
2
votes
0
answers
175
views
Interpretation of Tensor Flow CNN results with big dips in accuracy while training
I am trying to classify images using a CNN in tensor flow. I am doing 10 fold cross validation. At each fold, the training set is 900+ images and the validation set is 100 images. It is only two ...
2
votes
1
answer
800
views
MAP of Gaussian Process Classification in Tensorflow Probability
I'm attempting to implement Gaussian Process Classification learning in tensorflow-probability, but my estimator turns out to be very biased toward zero. As opposed ...
2
votes
0
answers
299
views
How do I set up my hyper-parameter space for optimizing a convolutional neural network (using packages Skopt and Tensorflow)
I just finished building a 1D CNN using TensorFlow, and I want to optimize a variety of hyper-parameters using Scikit-Optimize (skopt) (although, I would be willing to use whatever optimization ...
2
votes
0
answers
58
views
A mistake in Tensorflow's documation?
Tensorflow's documentation gives an example for text generation using a RNN with eager execution.
To the best of my understanding, this examples defines a simple RNN (with a GRU cell and a projection ...
2
votes
0
answers
692
views
Computing average precision metric and cost function for object detection task using scikitLearn and Tensorflow
I have a Data set that contains 5 thousand pictures of my object of interest and 5 thousand pictures with out it. I trained a Convolutional Neural Network using Tensor Flow to detect the position of ...
2
votes
0
answers
172
views
Neural network training: going backward to go forward?
I am working on CNN models which are intended to predict a protein's structure from its amino acid sequence. I have a decently large data set, 750 protein structures containing over 100,000 amino ...
2
votes
0
answers
372
views
How to select the regularization parameter between two losses?
In deep learning, the total loss commonly consists of a task-specific loss and a weight regularized loss:
loss = loss_specific + lambda * reg_loss
In my case (...
2
votes
0
answers
220
views
How to retrain a model (Inception) with 'prioritised' images in certain classifications
I am new to machine learning, and have constructed a basic CNN classifier by retraining the last layer of the Inception v3 model with my own image set into two classifications.
I did this in Python ...
2
votes
0
answers
2k
views
Discrepancy between categorical cross entropy and classification accuracy
I have a convolution neural network with random weights initialized and Trained to perform binary classification. I have 2000 images as training data and 2000 validation data. The problem I am trying ...
2
votes
0
answers
1k
views
LSTM Weight Matrix Interpretation
Consider the following code in Keras for building a LSTM model.
...
2
votes
0
answers
714
views
Implementing Keras image captioning example
I want to implement the image captioning example that https://keras.io/getting-started/sequential-model-guide/#examples has , for experimentation.
Instead of using their mentioned convnet, I decided ...
2
votes
1
answer
701
views
How to express Bayesian Network or Markov Random Field using deep learning
Bayesian Nework and Makov random field are instances of general probabilistic graphical model.
Is it possible to express Bayesian Network or Markov Random Field using deep learning? or in general to ...
2
votes
0
answers
671
views
Binary classification with CNN for soccer ball detection doesn't converge
I'm working on a project where I want to detect classic soccer balls in live camera pictures using a Convolutional Neural Network. My Network is built up as follows:
...
2
votes
0
answers
610
views
Combining categorical and continuous features in DNN
I am creating an application that can take as inputs, two numbers (1 or 0) as well as a class defining a binary operation (AND OR XOR etc) and training the network to preform the operation.
Without ...