Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix_Adapter& MHAdapter_Layer in the petl/petl_factory.py seems to be not used #13

Closed
Doragd opened this issue Dec 30, 2021 · 2 comments

Comments

@Doragd
Copy link

Doragd commented Dec 30, 2021

"Adapter" is not defined.

class Prefix_Adapter(nn.Module):
    def __init__(self, args, config):
        super().__init__()
        self.prefix = Prefix(args, config)
        self.adapters = Adapter(args, config) # "Adapter" is not defined 

    def forward(self, bsz, nsamples=1, device="cuda"):
        prefix = self.prefix(bsz, nsamples, device)
        adapters = self.adapters(bsz)

        for ii, dic in enumerate(adapters):
            for key, value in dic.items():
                prefix[ii][key] = value
        return prefix
@Doragd Doragd changed the title Prefix_Adapter in the petl/petl_factory.py seems to be not used Prefix_Adapter& MHAdapter_Layer in the petl/petl_factory.py seems to be not used Dec 30, 2021
@jxhe
Copy link
Owner

jxhe commented Jan 5, 2022

Thank you for capturing these oversights! We just fixed them

@jxhe jxhe closed this as completed Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants