(self, net)
| 321 | ) |
| 322 | |
| 323 | def add_train_ops(self, net): |
| 324 | # use the train_param_blobs to be consistent with the SamplingTrain unittest |
| 325 | |
| 326 | # obtain features |
| 327 | for i in range(self.num_bootstrap): |
| 328 | indices = self._generate_bootstrapped_indices( |
| 329 | net=net, |
| 330 | copied_cur_layer=self.input_record.field_blobs()[0], |
| 331 | iteration=i, |
| 332 | ) |
| 333 | bootstrapped_features = self._bootstrap_ops( |
| 334 | net=net, |
| 335 | copied_cur_layer=self.input_record.field_blobs()[0], |
| 336 | indices=indices, |
| 337 | iteration=i, |
| 338 | ) |
| 339 | self._add_ops( |
| 340 | net, |
| 341 | features=bootstrapped_features, |
| 342 | iteration=i, |
| 343 | params=self.train_param_blobs[i * 2 : (i * 2) + 2], |
| 344 | version="fp32", |
| 345 | ) |
| 346 | |
| 347 | def get_fp16_compatible_parameters(self): |
| 348 | if self.output_dim_vec is None or len(self.output_dim_vec) == 1: |
nothing calls this directly
no test coverage detected