Hello!
I put a small example on how to construct an autoencoder using V2.
This is a Image2Image model using the DataBlock
API
It runs on colab, you can view it here
I struggled a little bit, so it may be useful for someone else.
Great work! Could you put it over here in the projects thread?
https://forums.fast.ai/t/fastai2-blog-posts-projects-and-tutorials/65827
Thanks very much for your input. I am using fastai to built my own AE and this has been very helpful!
I updated the notebooks to V2 release (was on beta V2).
Thanks tcapelle for sharing your autoencoder solution. Interesting solution.
Maybe there has been version updates. When running it now and installing newest versions I had to make following two modifications:
‘arch = create_body(xresnet18, n_in=1).cuda()’
to
‘arch = create_body(xresnet18(pretrained=True), n_in=1).cuda()’
and
‘get_y = lambda o: o,’
to
‘get_y = named_function_to_make_learn_export_work,’
Without named function I ended up to error when saving the learner. This seems to be generic fastai issue and not just with my environment:
Yeah, this is very old. It does not take into account that fastai now integrates timm, and other cool stuff!