deep learning - Output from fully connected network in tensorflow -


weights = {  # 5x5 conv, 1 input, 32 outputs  'wc1': tf.variable(tf.random_normal([5, 5, 1, 32])), `# 5x5 conv, 32 inputs, 64 outputs`  'wc2': tf.variable(tf.random_normal([5, 5, 32, 64])),   # connected, 7*7*64 inputs, 1024 outputs 'wd1': tf.variable(tf.random_normal([7*7*64, 1024])),   # 1024 inputs, 10 outputs (class prediction)    'out': tf.variable(tf.random_normal([1024, n_classes]))    } 

in code,the output connected layer given 1024 cannot understand calculation '1024' generated , cannot find satisfactory answer tensorflow documentation.and how ouput size affects prediction result. in advance.

a number 1024 empirical, depending on data , goal.

in general, think question has many ramifications answer succinctly. i'll answer in restricted , assumed context of question: convolutional nets. kind of network describe have hidden layers more nodes target number of classes (this classifier, right?).

in case last hidden layer has 1024 nodes, more 10 output classes. necessary number? depends on data quantity, diversity, etc. number not mean without context , goal.

the least can confident with: number higher output classes. doing so, network able store "large" number of features describe classes. output layer gets these many features input, , computes combinations down expected number of classes.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -