7cda122d9636cdfe8dab5c745b3fa4d30ab57cc9,gluon/utils.py,,prepare_model,#Any#Any#Any#Any#Any#Any#,171
Before Change
if tune_layers:
tune_layers_ptrn = tuple(tune_layers.split(","))
params = net._collect_params_with_prefix()
param_keys = list(params.keys())
for key in param_keys:
if not key.startswith(tune_layers_ptrn):
params[key].grad_req = "null"
else:
logging.info("Fine-tune parameter: {}".format(key))
for param in net.collect_params().values():
if param._data is not None:
continue
param.initialize(mx.init.MSRAPrelu(), ctx=ctx)
After Change
net.initialize(mx.init.MSRAPrelu(), ctx=ctx)
if tune_layers:
tune_layers_pattern = re.compile(tune_layers)
for k, v in net._collect_params_with_prefix().items():
if tune_layers_pattern.match(k):
logging.info("Fine-tune parameter: {}".format(k))
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: osmr/imgclsmob
Commit Name: 7cda122d9636cdfe8dab5c745b3fa4d30ab57cc9
Time: 2018-12-11
Author: osemery@gmail.com
File Name: gluon/utils.py
Class Name:
Method Name: prepare_model
Project Name: coala/coala-bears
Commit Name: bfd61fb7a0c4456ce812a227f3b1962b2c727879
Time: 2016-09-03
Author: abdealikothari@gmail.com
File Name: bears/general/KeywordBear.py
Class Name: KeywordBear
Method Name: run
Project Name: streamlit/streamlit
Commit Name: 94e567f0890f4124e9fe65606e51c21b003e64ee
Time: 2020-01-29
Author: thiago@streamlit.io
File Name: lib/streamlit/__init__.py
Class Name:
Method Name: