From 08495a199e2821e4641cef3d3a71846d383e9c48 Mon Sep 17 00:00:00 2001 From: jh Date: Tue, 16 Mar 2021 17:19:26 -0700 Subject: [PATCH] test --- models/Model_SAEHD/Model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/Model_SAEHD/Model.py b/models/Model_SAEHD/Model.py index 4fa6b72..f879310 100644 --- a/models/Model_SAEHD/Model.py +++ b/models/Model_SAEHD/Model.py @@ -498,7 +498,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ... print("gpu_pred_src_src_d.shape: ", gpu_pred_src_src_d.shape) print("gpu_pred_src_src_d2.shape: ", gpu_pred_src_src_d2.shape) - print("gpu_pred_src_src_d.reshape([-1]).shape: ", gpu_pred_src_src_d.reshape([-1]).shape) + print("tf.reshape(gpu_pred_src_src_d, [-1]).shape: ", tf.reshape(gpu_pred_src_src_d, [-1]).shape) def get_smooth_noisy_label(label, smoothing=0.2, noise=0.05): @@ -509,7 +509,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ... else: return lambda x: np.random.uniform(1-smoothing/2, 1.0) - gpu_pred_src_src_d_ones = tf.map_fn (get_smooth_noisy_label(1, smoothing=0.2, noise=0.05), gpu_pred_src_src_d.reshape([-1])).reshape(gpu_pred_src_src_d.shape) + gpu_pred_src_src_d_ones = tf.reshape(tf.map_fn (get_smooth_noisy_label(1, smoothing=0.2, noise=0.05), tf.reshape(gpu_pred_src_src_d, [-1])), gpu_pred_src_src_d.shape) gpu_pred_src_src_d_zeros = tf.map_fn (get_smooth_noisy_label(0, smoothing=0.2, noise=0.05), gpu_pred_src_src_d) print("Shape (gpu_pred_src_src_d_ones): ", gpu_pred_src_src_d.shape)