212abd8f1113e9eabf5248078acc54021d02268e,models/networks.py,,define_D,#Any#Any#Any#Any#Any#Any#Any#Any#,125
Before Change
else:
raise NotImplementedError("Discriminator model name [%s] is not recognized" %
which_model_netD)
if use_gpu:
netD.cuda(gpu_ids[0])
init_weights(netD, init_type=init_type)
return netD
After Change
if use_gpu:
assert(torch.cuda.is_available())
netD.cuda(gpu_ids[0])
if len(gpu_ids) > 1:
netD = torch.nn.DataParallel(netD, gpu_ids)
init_weights(netD, init_type=init_type)
return netD
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: richzhang/colorization-pytorch
Commit Name: 212abd8f1113e9eabf5248078acc54021d02268e
Time: 2018-04-18
Author: junyanzhu89@gmail.com
File Name: models/networks.py
Class Name:
Method Name: define_D
Project Name: analysiscenter/batchflow
Commit Name: 5a02907c87235fc8ee7ca1f15bca29f3699766e2
Time: 2019-11-01
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/eager_torch/base.py
Class Name: EagerTorch
Method Name: _build