kyegomez / Med-PaLM

Towards Generalist Biomedical AI
https://discord.gg/qUtxnK2NMf
MIT License
321 stars 47 forks source link

Code error need help #8

Closed ricktop123 closed 1 year ago

ricktop123 commented 1 year ago

When I run example.py, File "/project/Med-PaLM/example.py", line 9, in model = MedPalm() File "/project/Med-PaLM/medpalm/model.py", line 121, in init self.encoder = ViTransformerWrapper(

AttributeError: cannot assign module before Module.init() call

ricktop123 commented 1 year ago

it seems the self.encoder didnot define above

kyegomez commented 1 year ago

@ricktop123 Hey please excuse me can you provide the full error log for me please.

ricktop123 commented 1 year ago

@ricktop123 Hey please excuse me can you provide the full error log for me please.

Traceback (most recent call last): File "/project/Med-PaLM/example.py", line 9, in model = MedPalm() File "/project/Med-PaLM/medpalm/model.py", line 121, in init self.encoder = ViTransformerWrapper( File "/XXX/anaconda3/envs/MedPL/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1294, in setattr raise AttributeError( AttributeError: cannot assign module before Module.init() call

instabaines commented 1 year ago

I encountered the same error

kyegomez commented 1 year ago

@ricktop123 @instabaines They are both fixed now, thanks for your patience!