Commit 514a10de authored by Andrew Gilbert's avatar Andrew Gilbert
Browse files

Fixed calls to concat and convolution2d

parent cfdbdf10
......@@ -128,13 +128,13 @@ class AdversarialCrypto(object):
"""
if key is not None:
combined_message = tf.concat(1, [message, key])
combined_message = tf.concat([message, key], 1)
else:
combined_message = message
# Ensure that all variables created are in the specified collection.
with tf.contrib.framework.arg_scope(
[tf.contrib.layers.fully_connected, tf.contrib.layers.convolution],
[tf.contrib.layers.fully_connected, tf.contrib.layers.convolution2d],
variables_collections=[collection]):
fc = tf.contrib.layers.fully_connected(
......@@ -147,13 +147,13 @@ class AdversarialCrypto(object):
# and then squeezing it back down).
fc = tf.expand_dims(fc, 2)
# 2,1 -> 1,2
conv = tf.contrib.layers.convolution(
conv = tf.contrib.layers.convolution2d(
fc, 2, 2, 2, 'SAME', activation_fn=tf.nn.sigmoid)
# 1,2 -> 1, 2
conv = tf.contrib.layers.convolution(
conv = tf.contrib.layers.convolution2d(
conv, 2, 1, 1, 'SAME', activation_fn=tf.nn.sigmoid)
# 1,2 -> 1, 1
conv = tf.contrib.layers.convolution(
conv = tf.contrib.layers.convolution2d(
conv, 1, 1, 1, 'SAME', activation_fn=tf.nn.tanh)
conv = tf.squeeze(conv, 2)
return conv
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment