Questions tagged [mini-batch]

Use mini-batch when working with neural networks and in particular with mini-batch stochastic gradient descent.

A mini-batch is a subset of the input data (batch) broken up into many smaller pieces (mini-batch) that are used to train the neural network.

References

84 questions
0
votes
0 answers

How to implement a Mini-Batch Gradient Descent in C starting with a Stochastic one?

I have done a stochastic NN but the variation is too big so i want to go for a batch one but, as far as I've tried, I can't get acceptable results, I can't understand when I have done the forward how can I combine data to update weights. There is an…
Dr. Slump
  • 3
  • 3
0
votes
0 answers

what does " [...] " to load data on disk with tensorflow

I'm beginning with tensorflow and Machine Learning , but I have a book very useful about it. I would like to implement mini-batch gradient descent. I followed exactly what they said but it didn't work. It's explained as : "Finally, in the execution…
0
votes
0 answers

K-means minibatch Memory error on large data

I am using sklearn Kmeans Minibatch for clustering large data and I get a memory error. Here is my laptop configuration on this configuration its working fine: Core i5 64 bit Python 3.6.2 8 GB RAM I stored TfidfVectorizer X in .npz file(426 Mb).…
Mihir
  • 31
  • 7
0
votes
1 answer

How to make a selective back-propagation in a mini-batch in Tensorflow?

Recently, I'm working on a project "predicting future trajectories of objects from their past trajectories by using LSTMs in Tensorflow." (Here, a trajectory means a sequence of 2D positions.) Input to the LSTM is, of course, 'past trajectories' and…
cdsjjav
  • 41
  • 7
0
votes
2 answers

Generator function in LSTM Keras for outputting mini batches of one files

I have a generator function which works fine. I have a large list of .txt files in which each file is also quite long. The task would now be to write a generator function which Takes: a batch of Files and then a batch of size 128 out of one…
Henryk Borzymowski
  • 988
  • 1
  • 10
  • 22
0
votes
1 answer

Custom CNN mini-batch (Keras, TF) to avoid repeated measurements in training/testing

I am currently building a 1D-CNN for classification. The predictors are spectra (X-matrix with 779 features), and the dependent variable contains two classes. However, the X-matrix contains repeated measurements (series of 15-20 replicates). It is…
Petar
  • 3
  • 1
0
votes
2 answers

tensorflow, mini-batch, tf.placeholder - read state of nodes at given iteration

I want to print the value of MSE at each epoch/batch combination. the code below reports the tensor object representing the mse instead of its value at each iteration: print("Epoch", epoch, "Batch_Index", batch_index, "MSE:", mse) Example line of…
sebtac
  • 538
  • 5
  • 8
0
votes
2 answers

Number of backprops as performance metric for neural networks

I have been reading article about SRCNN and found that they are using "number of backprops" for evaluating how well network is performing, i.e. what network is able to learn after x backprops (as I understand). I would like to know what number of…
0
votes
0 answers

Tensorflow : train on mini batch, fast then slow

I am a beginner in tensorflow and I am trying to train a model using "mini batch". To do that I created a generator and iterate it. The problem I encounter is that, at the beginning of the epoch, the train seems fast (many batch per seconds) then…
Shiro
  • 795
  • 1
  • 7
  • 23
0
votes
0 answers

Recurrent Neural Network Mini-Batch dependency after trained

Currently, I have a neural network, built in tensorflow that is used to classify time sequence data into one of 6 categories. The network is composed of: 2 fully connected layers -> LSTM unit -> softmax -> output All layers have regularization in…
0
votes
0 answers

Unable to feed mini-batch to Tensorflow input placeholder - Tensorflow 1.3.0

Can anyone tell me why I can’t feed mini-batch of data to my inputs tf.nn.placeholder? Did something change lately because it've worked for me for whole last year? Error: Cannot feed value of shape (1024, 784) for Tensor 'nn_inputs:0', which has…
F1sher
  • 7,140
  • 11
  • 48
  • 85
0
votes
0 answers

Loss function with mini batches in deep learning

If I understand correctly, when using deep learning with mini batches, we have a forward and backward pass in every mini batch (with the corresponding optimizer). But does something different happen at the end of the epoch (after using all mini…
0
votes
1 answer

how to efficiently make a mini-batch of images in pytorch?

I am trying to calculate a forward pass using pre-trained ResNet model in pytorch. I am having trouble creating a 4-d Tensor of mini-batches. Can someone please tell what is the proper way to do that? EDIT: I changed the code and it works now.…
Ramin
  • 31
  • 1
  • 5
0
votes
1 answer

One Hot Encoding in Tensor flow for Batch Training

My training data contains ~1500 labels(string,one label per record) and I want to do batch training (just load one batch into memory to update weights in a neural network). I was wondering if there is a class in tensorflow to do one hot encoding for…
Undecided
  • 611
  • 8
  • 13
0
votes
0 answers

Training Mini-batches of data (without labels) for unsupervised learning

Has anyone trained mini-batches of data for an unsupervised learning problem? The feed_dict uses the label and in an unsupervised setting. How do you overcome that? Could we use fake labels that never contribute to the loss function? Basically, I…