Open jakubMitura14 opened 1 year ago
@jakubMitura14 had same issue, look like factory has now been deemed unmaintained. Please see https://github.com/facebookresearch/xformers/pull/850
TLDR: you need to write your own (Vit) module now. my aim is to raise a PR for the ViT example. will update here once I'm done
@chriseviparker Did you raise a PR?
🐛 Bug
Command
I am trying to execute the VIT example [1] from the examples folder with new pytorch lightning and I get an error as below
I also had some small issues like
So i resolved those manually
And aded task to accuracy object
During debugging I had inspected class xFormer(torch.nn.Module) and in the forward function numer of encoders is 6 (although it seems to me that from configuration it should be 1). Additionally I see that patch encoding is invoked multiple times in a single case - so when patchembedding gets executed second time will get incorrect shape and will not work.
1)https://github.com/facebookresearch/xformers/blob/main/examples/cifar_ViT.py
Environment