Cyclical learning is not working

Hello! I am using fastai 0.7 and I am getting an error at this line of code: learn.fit(5e-3, 1, cycle_len=10, use_clr_beta = (20,10,0.95,0.85), wds=wd, use_wd_sched=True). This is the error: TypeError: loop of ufunc does not support argument 0 of type float which has no callable rint method. I used the exactly same code on another computer and it worked, so I assum it’s a problem with the environment. Does anyone know how to fix this? Thank you!

Usually it helps to look at the call stack and where exactly it’s giving this error. If you could copy/paste or take an image that would help a lot in figuring this out.

Thank you for your reply! Here is the full output (I hope this is what you meant)

It seems that in model.py there are some places where this line is called: np.round(values, decimals). If I add before each of these lines this: values = np.array(values, dtype=np.float), the program works just fine. Am I using an old version of the code, or is this an ongoing problem? Thank you!

1 Like

worked well with me! I called this before the print_stats() function:

vals = np.array(vals, dtype=np.float)