Skip to content

Commit

Permalink
Modify TensorBoard example of summit 2017
Browse files Browse the repository at this point in the history
   Add condition which decides to take two conv layers or one
  • Loading branch information
leejaymin committed Mar 20, 2017
1 parent b3ccbe0 commit 1f78663
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .idea/deployment.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions 7.TensorBoard/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
urlretrieve(GIST_URL + 'labels_1024.tsv', LOGDIR + 'labels_1024.tsv')
urlretrieve(GIST_URL + 'sprite_1024.png', LOGDIR + 'sprite_1024.png')


def conv_layer(input, size_in, size_out, name="conv"):
with tf.name_scope(name):
w = tf.Variable(tf.truncated_normal([5, 5, size_in, size_out], stddev=0.1), name="W")
Expand Down Expand Up @@ -133,14 +132,15 @@ def main():
# You can try adding some more learning rates
for learning_rate in [1E-3, 1E-4, 1E-5]:
# Include "False" as a value to try different model architectures
for use_two_fc in [True]:
for use_two_conv in [True]:
for use_two_fc in [True, False]:
for use_two_conv in [True, False]:
# Construct a hyperparameter string for each one (example: "lr_1E-3,fc=2,conv=2)
hparam = make_hparam_string(learning_rate, use_two_fc, use_two_conv)
print('Starting run for %s' % hparam)

# Actually run with the new settings
mnist_model(learning_rate, use_two_fc, use_two_conv, hparam)


if __name__ == '__main__':
main()

0 comments on commit 1f78663

Please sign in to comment.