MCPcopy Create free account
hub / github.com/OpenGVLab/EfficientQAT / forward

Method forward

quantize/block_ap.py:88–95  ·  view source on GitHub ↗
(self, inp, **kwargs)

Source from the content-addressed store, hash-verified

86 self.position_ids = None
87
88 def forward(self, inp, **kwargs):
89 self.dataset.update_data(self.index, inp.squeeze(0).to('cpu'))
90 self.index += 1
91 if self.attention_mask is None:
92 self.attention_mask = kwargs["attention_mask"]
93 if self.position_ids is None:
94 self.position_ids = kwargs["position_ids"]
95 raise ValueError
96
97 # step 3.1: catch the input of training set
98 layers[0] = Catcher(layers[0],fp_train_inps)

Callers

nothing calls this directly

Calls 1

update_dataMethod · 0.80

Tested by

no test coverage detected