Getting repeatable results in fastai

I am trying to get repeatable results, ie using the same image and augmentations on each run. This is mostly for debugging purposes. I have found a way but is there a better way?

dls.after_item.split_idx=True
dls.show_batch(dls.after_batch(dls.do_batch([dls.after_item(ds[0])])))

Have you tried using set_seed (docs)?

2 Likes

That may work. I had completely forgotten about the existence of seeds. I am specifically trying to debug two versions of the code base side by side, so it may not work, but yes definitely should try that.

1 Like