MCPcopy
hub / github.com/sshaoshuai/PointRCNN / new

Method new

tools/train_utils/fastai_optim.py:121–126  ·  view source on GitHub ↗

Create a new `OptimWrapper` from `self` with another `layer_groups` but the same hyper-parameters.

(self, layer_groups)

Source from the content-addressed store, hash-verified

119 return opt
120
121 def new(self, layer_groups):
122 "Create a new `OptimWrapper` from `self` with another `layer_groups` but the same hyper-parameters."
123 opt_func = getattr(self, 'opt_func', self.opt.__class__)
124 split_groups = split_bn_bias(layer_groups)
125 opt = opt_func([{'params': trainable_params(l), 'lr': 0} for l in split_groups])
126 return self.create(opt_func, self.lr, layer_groups, wd=self.wd, true_wd=self.true_wd, bn_wd=self.bn_wd)
127
128 def __repr__(self) -> str:
129 return f'OptimWrapper over {repr(self.opt)}.\nTrue weight decay: {self.true_wd}'

Callers 6

get_masterFunction · 0.80
model_g2master_gFunction · 0.80
boxes3d_to_bev_torchFunction · 0.80
get_rpn_lossFunction · 0.80
forwardMethod · 0.80
sample_rois_for_rcnnMethod · 0.80

Calls 3

createMethod · 0.95
split_bn_biasFunction · 0.85
trainable_paramsFunction · 0.85

Tested by

no test coverage detected