The introductory documentation, which I am reading (TOC here) uses the term "batch" (for instance here) without having defined it.
What is a batch in TensorFlow?
69.1k Views Asked by Jeffrey Benjamin Brown At
1
There are 1 best solutions below
Related Questions in TENSORFLOW
- (Tensorflow)Does the op assign change the gradient computation?
- Tensorflow Windows Accessing Folders Denied:"NewRandomAccessFile failed to Create/Open: Access is denied. ; Input/output error"
- Android App TensorFlow Google Cloud ML
- Convert Tensorflow model to Caffe model
- Google Tensorflow LSTMCell Variables Mapping to Hochreiter97_lstm.pdf paper
- additive Gaussian noise in Tensorflow
- TFlearn evaluate method results meaning
- Regularization losses Tensorflow - TRAINABLE_VARIABLES to Tensor Array
- feed picture to model tensorflow for training
- Fail to read the new format of tensorflow checkpoint?
- I got a error when running a github project in tensorflow
- Tensorflow R0.12 softmax_cross_entropy_with_logits ASSERT Error
- RuntimeError in run_one_batch of TensorFlowDataFrame in tensorflow
- Same output in neural network for each input after training
- ConvNet : Validation Loss not strongly decreasing but accuracy is improving
Related Questions in MACHINE-LEARNING
- How to cluster a set of strings?
- Enforcing that inputs sum to 1 and are contained in the unit interval in scikit-learn
- scikit-learn preperation
- Spark MLLib How to ignore features when training a classifier
- Increasing the efficiency of equipment using Amazon Machine Learning
- How to interpret scikit's learn confusion matrix and classification report?
- Amazon Machine Learning for sentiment analysis
- What Machine Learning algorithm would be appropriate?
- LDA generated topics
- Spectral clustering with Similarity matrix constructed by jaccard coefficient
- Speeding up Viterbi execution
- Memory Error with Classifier fit and partial_fit
- How to find algo type(regression,classification) in Caret in R for all algos at once?
- Difference between weka tool's correlation coefficient and scikit learn's coefficient of determination score
- What are the approaches to the Big-Data problems?
Related Questions in NEURAL-NETWORK
- How to choose good SURF feature keypoints?
- How to avoid overfitting (Encog3 C#)?
- Run out of VRAM using Theano on Amazon cluster
- Calculating equation from image in Java
- Print output of a Theano network
- Torch Lua: Why is my gradient descent not optimizing the error?
- How can I train a neural (pattern recognition) network multiple times in matlab?
- Using Convolution Neural Net with Lasagne in Python error
- Random number of hidden units improves accuracy/F-score on test set
- Matlab example code for deep belief network for classification
- Pybrain Reinforcement Learning Example
- How to speed up caffe classifer in python
- Opencv mlp Same Data Different Results
- Word2Vec Data Setup
- How can I construct a Neural Network in Matlab with matrix of features extracted from images?
Related Questions in DEEP-LEARNING
- [Caffe]: Check failed: ShapeEquals(proto) shape mismatch (reshape not set)
- Caffe net.predict() outputs random results (GoogleNet)
- Implementation of convolutional sparse coding in deep networks frameworks
- Matlab example code for deep belief network for classification
- Two errors while running Caffe
- How to speed up caffe classifer in python
- Caffe Framework Runtest Core dumped error
- Scan function from Theano replicates non_sequences shared variables
- Why bad accuracy with neural network?
- Word2Vec Sentiment Classification with R and H2O
- What is gradInput and gradOutput in Torch7's 'nn' package?
- Error while drawing net in Caffe
- How does Caffe determine the number of neurons in each layer?
- Conclusion from PCA of dataset
- Google Deep Dream art: how to pick a layer in a neural network and enhance it
Related Questions in TENSOR
- What is a batch in TensorFlow?
- Eigen::Tensor double contraction to scalar value
- tensorflow inference graph performance optimization
- Simple linear regression with Tensorflow and SKCompat
- Tensorflow dense layer operation
- reshape tensor between two layers
- "expected CPU tensor(got CUDA tensor)" error for PyTorch
- Getting a Tensors value in Java
- TensorFlow: How to get sub array for each row in tensor
- indexing in tensorflow slower than gather
- tensorflow converting tensor to python list is too slow
- Resized copy of Pytorch Tensor/Dataset
- Removing low quality tensor predictions from softmax
- How to slice a tensor with None dimension in Tensorflow
- Generate low rank tensor
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Let's say you want to do digit recognition (MNIST) and you have defined your architecture of the network (CNNs). Now, you can start feeding the images from the training data one by one to the network, get the prediction (till this step it's called as doing inference), compute the loss, compute the gradient, and then update the parameters of your network (i.e. weights and biases) and then proceed with the next image ... This way of training the model is sometimes called as online learning.
But, you want the training to be faster, the gradients to be less noisy, and also take advantage of the power of GPUs which are efficient at doing array operations (nD-arrays to be specific). So, what you instead do is feed in say 100 images at a time (the choice of this size is up to you (i.e. it's a hyperparameter) and depends on your problem too). For instance, take a look at the below picture, (Author: Martin Gorner)
Here, since you're feeding in 100 images(
28x28) at a time (instead of 1 as in the online training case), the batch size is 100. Oftentimes this is called as mini-batch size or simplymini-batch.Also the below picture: (Author: Martin Gorner)
Now, the matrix multiplication will all just work out perfectly fine and you will also be taking advantage of the highly optimized array operations and hence achieve faster training time.
If you observe the above picture, it doesn't matter that much whether you give 100 or 256 or 2048 or 10000 (batch size) images as long as it fits in the memory of your (GPU) hardware. You'll simply get that many predictions.
But, please keep in mind that this batch size influences the training time, the error that you achieve, the gradient shifts etc., There is no general rule of thumb as to which batch size works out best. Just try a few sizes and pick the one which works best for you. But try not to use large batch sizes since it will overfit the data. People commonly use mini-batch sizes of
32, 64, 128, 256, 512, 1024, 2048.Bonus: To get a good grasp of how crazy you can go with this batch size, please give this paper a read: weird trick for parallelizing CNNs