Skip to content

Commit 730ad36

Browse files
committed
improve comments
1 parent 670e08b commit 730ad36

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

LeNet-Lab-Solution.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@
243243
" # SOLUTION: Pooling. Input = 10x10x16. Output = 5x5x16.\n",
244244
" conv2 = tf.nn.max_pool(conv2, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='VALID')\n",
245245
"\n",
246-
" # SOLUTION: Flatten.\n",
246+
" # SOLUTION: Flatten. Input = 5x5x16. Output = 400.\n",
247247
" fc0 = flatten(conv2)\n",
248248
" \n",
249-
" # SOLUTION: Layer 3: Fully Connected. Input = 400 (5x5x16). Output = 120.\n",
249+
" # SOLUTION: Layer 3: Fully Connected. Input = 400. Output = 120.\n",
250250
" fc1_W = tf.Variable(tf.truncated_normal(shape=(400, 120), mean = mu, stddev = sigma))\n",
251251
" fc1_b = tf.Variable(tf.zeros(120))\n",
252252
" fc1 = tf.matmul(fc0, fc1_W) + fc1_b\n",
@@ -350,7 +350,7 @@
350350
" sess = tf.get_default_session()\n",
351351
" for offset in range(0, num_examples, BATCH_SIZE):\n",
352352
" batch_x, batch_y = X_data[offset:offset+BATCH_SIZE], y_data[offset:offset+BATCH_SIZE]\n",
353-
" accuracy = sess.run(accuracy_operation, feed_dict={x: batch_x, y: batch_y})\n",
353+
" accuracy = sess.run(accuracy_operation, feed_dict={x: batch_x, y: batch_y})\n",
354354
" total_accuracy += (accuracy * len(batch_x))\n",
355355
" return total_accuracy / num_examples"
356356
]
@@ -390,7 +390,7 @@
390390
" for offset in range(0, num_examples, BATCH_SIZE):\n",
391391
" end = offset + BATCH_SIZE\n",
392392
" batch_x, batch_y = X_train[offset:end], y_train[offset:end]\n",
393-
" loss = sess.run(training_operation, feed_dict={x: batch_x, y: batch_y})\n",
393+
" sess.run(training_operation, feed_dict={x: batch_x, y: batch_y})\n",
394394
" \n",
395395
" validation_accuracy = evaluate(X_validation, y_validation)\n",
396396
" print(\"EPOCH {} ...\".format(i+1))\n",

LeNet-Lab.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@
233233
"\n",
234234
" # TODO: Pooling. Input = 10x10x16. Output = 5x5x16.\n",
235235
"\n",
236-
" # TODO: Flatten.\n",
236+
" # TODO: Flatten. Input = 5x5x16. Output = 400.\n",
237237
" \n",
238-
" # TODO: Layer 3: Fully Connected. Input = 400 (5x5x16). Output = 120.\n",
238+
" # TODO: Layer 3: Fully Connected. Input = 400. Output = 120.\n",
239239
" \n",
240240
" # TODO: Activation.\n",
241241
"\n",

0 commit comments

Comments
 (0)