d4f36c2f11e20e6d5a7499cb9f717b03f5c1e787,slm_lab/agent/net/mlp.py,MLPNet,__init__,#MLPNet#Any#Any#Any#,44
Before Change
if ps.is_integer(self.out_dim):
self.model_tail = nn.Linear(dims[-1], self.out_dim)
else:
self.model_tails = nn.ModuleList([nn.Linear(dims[-1], out_d) for out_d in self.out_dim])
net_util.init_layers(self, self.init_fn)
for module in self.modules():
After Change
if ps.is_integer(self.out_dim):
self.model_tail = net_util.build_fc_model([dims[-1], self.out_dim], self.out_layer_activation)
else:
if not ps.is_list(self.out_layer_activation):
self.out_layer_activation = [self.out_layer_activation] * len(out_dim)
assert len(self.out_layer_activation) == len(self.out_dim)
tails = []
for out_d, out_activ in zip(self.out_dim, self.out_layer_activation):
tail = net_util.build_fc_model([dims[-1], out_d], out_activ)
tails.append(tail)
self.model_tails = nn.ModuleList(tails)
net_util.init_layers(self, self.init_fn)
for module in self.modules():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 30
Instances
Project Name: kengz/SLM-Lab
Commit Name: d4f36c2f11e20e6d5a7499cb9f717b03f5c1e787
Time: 2019-04-17
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/mlp.py
Class Name: MLPNet
Method Name: __init__
Project Name: kengz/SLM-Lab
Commit Name: d4f36c2f11e20e6d5a7499cb9f717b03f5c1e787
Time: 2019-04-17
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/mlp.py
Class Name: MLPNet
Method Name: __init__
Project Name: kengz/SLM-Lab
Commit Name: d4f36c2f11e20e6d5a7499cb9f717b03f5c1e787
Time: 2019-04-17
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/conv.py
Class Name: ConvNet
Method Name: __init__
Project Name: kengz/SLM-Lab
Commit Name: d4f36c2f11e20e6d5a7499cb9f717b03f5c1e787
Time: 2019-04-17
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/recurrent.py
Class Name: RecurrentNet
Method Name: __init__