From 3f27107eafc98fa207cb19138b1b3f5f2927206e Mon Sep 17 00:00:00 2001 From: jh Date: Sat, 8 May 2021 12:27:06 -0700 Subject: [PATCH] fix bug --- models/Model_SAEHD/Model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Model_SAEHD/Model.py b/models/Model_SAEHD/Model.py index 16630da..33eaf1d 100644 --- a/models/Model_SAEHD/Model.py +++ b/models/Model_SAEHD/Model.py @@ -580,7 +580,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ... x = tf.cast(x, tf.float32) x = tf.math.scalar_mul(1-smoothing, x) # x = x + (smoothing/num_labels) - x = tf.reshape(x, (self.batch_size,) + tensor.shape[1:]) + x = tf.reshape(x, (self.batch_size,) + tensor.shape.as_list()[1:]) return x smoothing = self.options['gan_smoothing']