rabeehk / compacter

127 stars 15 forks source link

implementation issue #6

Closed FredZZD closed 2 years ago

FredZZD commented 2 years ago

In your paper, there's a res connect in adapter module, but it was not implemented in the code. def forward(self, x): z = self.down_sampler(x) z = self.activation(z) output = self.up_sampler(z) return output image I wonder if it should be return output + x thanks

rabeehk commented 2 years ago

Hi thanks for the question, this is done in AdapterController module, please see https://github.com/rabeehk/compacter/blob/b210eef13f64ff6441186ee5a1cbf031b5918b94/seq2seq/adapters/adapter_controller.py#L115 thanks

FredZZD commented 2 years ago

Got it, thanks a lot