Comments (1)
Hi @leigaoyi , Thanks for your questions.
I think you have two main questions. The first is 'What is the effect of batch size on convergence?'. One way to think of this is to first think of a smooth convex solution space. In this situation, we have exactly one global minimum and ideally we just use the whole dataset in one single batch and converge cleanly towards the minimum solution. Of course, most sample spaces have multiple local minimum and using the whole dataset risks us getting stuck in a local minimum. To combat this, we can change the solution space by sampling the data, creating smaller batches of data. The smaller the sample the more 'jitter' we introduce in the convergence. We have to strike a balance between jittering the convergence too little (getting stuck in a local minimum) and jittering the convergence too much (not finding the global minimum).
Your second question is about how TensorFlow can apply operations across tensors of different sizes. In this case, TensorFlow operates the same way as Numpy, using broadcasting. Broadcasting is a way to apply an operation across multiple dimensions of a tensor (or array). I recommend reading more here:
https://www.tensorflow.org/api_guides/python/math_ops
I'm going to close this issue. If you have problems with the code, feel free to reopen this issue. Thanks!
from tensorflow_cookbook.
Related Issues (20)
- tf.contrib.learn.preprocessing will be deprecated HOT 2
- questions about 01_Introduction/04_Working_with_Matrices/ HOT 1
- Formula error at Chapter 4 (Working with Linear SVM) HOT 2
- model_output = tf.subtract(tf.matmul(x_data, A), b) should be tf.add HOT 1
- Possible Error in build_vocab - 09_Recurrent_Neural_Networks/03_Implementing_LSTM/03_implementing_lstm.py HOT 1
- How to save KNN model and use it next testset? HOT 1
- Since the first training is done, document embedding hasn't been trained HOT 3
- on what basis do we classify whether msg is spam or ham HOT 2
- DNN Linear regression HOT 1
- Having problem in predicting the message HOT 3
- how to add model persistance to this spam filter using pickle HOT 2
- I got a problem with Tensorflow + SVM + MNIST after learning your code HOT 3
- How to use non-linear multi-class SVM to predict class for new data? HOT 4
- Introductory CNN Model: TypeError: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int32, int64
- Chapter 11 Keras example
- Kernel SVM training with data in a fixed sequence HOT 1
- Chapter 8 Example: Implementing a Simpler CNN
- chapter 8 Example: Implenmenting an Advanced CNN make python stopped working HOT 1
- Mnist dataset use Multi-class SVM to predict Chapter 4
- how to explain this line? Ch4,04_svm_kernels.py,line71:prediction = tf.sign(prediction_output - tf.reduce_mean(prediction_output))
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow_cookbook.