Closed Chen94yue closed 5 months ago
不就是mlp吗,用了self.mlp,不知道我理解有错不
@tianrun-chen Can you please help with this. Can you let us know where we can find the code for the adaptor?
I think it's implemented as prompt-generator in ImageEncoderViT.
In './models/image_encoder.py', the class ImageEncoderViT
same question
Please Check models/mmseg/models/sam/image_encoder.py
Adapter is not added to the training or am I misunderstanding the code?
the model is init in:
https://github.com/tianrun-chen/SAM-Adapter-PyTorch/blob/62a83a48b254fdd0cfb71e8be8df87dfa0d5a9d8/train.py#L96-L111
In config file, the code chooses 'sam', and the 'sam' model is defined in 'models/sam.py'.
In the forward of sam:
https://github.com/tianrun-chen/SAM-Adapter-PyTorch/blob/62a83a48b254fdd0cfb71e8be8df87dfa0d5a9d8/models/sam.py#L169-L191
Use "self.image_encoder" to get image embedding, this sub-module is defined in 'ImageEncoderViT', it is implemented in ‘models/mmseg/models/sam/image_encoder.py’. In this file, I just can't find any implemented about adapter, only see one variable that is not being used ‘self.adapter’.