Insults
Insults copied to clipboard
Fix the following garbage code
from nn_model/util.py
def binarize(x, sz=71):
return tf.to_float(tf.one_hot(x, sz, on_value=1, off_value=0, axis=-1))
def binarize_outshape(in_shape):
return in_shape[0], in_shape[1], 71
Who in their right mind would hard code magic numbers like....
Turns out these functions actually get passed in as objects to another function, so removing those hard-coded 71 values is not trivial. Still, should be done.