We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70d9a55 commit dcd1305Copy full SHA for dcd1305
model.py
@@ -11,25 +11,6 @@
11
from rouge import FilesRouge
12
13
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
29
30
31
32
33
class Model:
34
topk = 10
35
num_batches_to_log = 100
0 commit comments