Skip to content

Commit dcd1305

Browse files
committed
Delete debug code.
1 parent 70d9a55 commit dcd1305

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

model.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,6 @@
1111
from rouge import FilesRouge
1212

1313

14-
def nans_(tensor, msg=''):
15-
number_of_nans = tf.cast(tf.reduce_sum(tf.cast(tf.is_nan(
16-
tensor
17-
), tf.float32)), tf.int64)
18-
print_op = tf.print(f'NUMBER OF NANS in {msg}: ', number_of_nans,
19-
' / ', tf.size(tensor))
20-
with tf.control_dependencies([print_op]):
21-
return tensor + 0
22-
23-
24-
def zeros_(tensor, msg=''):
25-
number_of_zeros = tf.size(tensor, out_type=tf.int64) - tf.count_nonzero(
26-
tensor)
27-
print_op = tf.print(f'NUMBER OF ZEROS in {msg}: ', number_of_zeros,
28-
' / ', tf.size(tensor))
29-
with tf.control_dependencies([print_op]):
30-
return tensor + 0
31-
32-
3314
class Model:
3415
topk = 10
3516
num_batches_to_log = 100

0 commit comments

Comments
 (0)