Closed linzhk closed 4 years ago
in the function :
def kl_anneal_function(anneal_function, step, k, x0):
if anneal_function == 'logistic': return float(1/(1+np.exp(-k*(step-x0)))) elif anneal_function == 'linear': return min(1, step/x0)
you will see k is a str.that is wrong and i change it into 1
It shouldn't be a string. It comes from the command line, see here: parser.add_argument('-k', '--k', type=float, default=0.0025)
parser.add_argument('-k', '--k', type=float, default=0.0025)
in the function :
you will see k is a str.that is wrong and i change it into 1