4999f9795af7a21ca69adf5f72301b79f719498e,gluoncv/model_zoo/pspnet.py,PSPNet,__init__,#PSPNet#Any#Any#Any#Any#,33
Before Change
def __init__(self, nclass, backbone="resnet50", norm_layer=nn.BatchNorm,
aux=True, **kwargs):
super(PSPNet, self).__init__(nclass, backbone, aux, norm_layer, **kwargs)
with self.name_scope():
self.head = _PSPHead(nclass, norm_layer=norm_layer, **kwargs)
self.head.initialize()
self.head.collect_params().setattr("lr_mult", 10)
if self.aux:
self.auxlayer = _FCNHead(1024, nclass, norm_layer=norm_layer, **kwargs)
self.auxlayer.initialize()
self.auxlayer.collect_params().setattr("lr_mult", 10)
def forward(self, x):
_, _, H, W = x.shape
c3, c4 = self.base_forward(x)
outputs = []
After Change
if self.aux:
self.auxlayer = _FCNHead(1024, nclass, norm_layer=norm_layer, **kwargs)
self.auxlayer.initialize()
self.auxlayer.collect_params().setattr("lr_mult", 10)
def hybrid_forward(self, F, x):
c3, c4 = self.base_forward(x)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: dmlc/gluon-cv
Commit Name: 4999f9795af7a21ca69adf5f72301b79f719498e
Time: 2018-06-05
Author: 8041160+zhanghang1989@users.noreply.github.com
File Name: gluoncv/model_zoo/pspnet.py
Class Name: PSPNet
Method Name: __init__
Project Name: tensorlayer/tensorlayer
Commit Name: 3d305831a0edd1288cc2f94f81debbdc359d7bb3
Time: 2019-03-22
Author: jingqing.zhang15@imperial.ac.uk
File Name: tensorlayer/layers/lambda_layers.py
Class Name: Lambda
Method Name: __init__
Project Name: streamlit/streamlit
Commit Name: 5ca403cee17ee1e2a704e03bf06d47f2ce9ba222
Time: 2020-02-06
Author: naomi@nthmost.com
File Name: examples/audio.py
Class Name:
Method Name: