6685375652d622dfe398ab28f8f14ed9edf8ff1d,ml/rl/models/dqn.py,_DataParallelFullyConnectedDQN,__init__,#_DataParallelFullyConnectedDQN#Any#,51
Before Change
class _DataParallelFullyConnectedDQN(ModelBase):
def __init__(self, fc_dqn):
super(_DataParallelFullyConnectedDQN, self).__init__()
self.state_dim = fc_dqn.state_dim
self.action_dim = fc_dqn.action_dim
self.data_parallel = torch.nn.DataParallel(fc_dqn.fc)
self.fc_dqn = fc_dqn
def input_prototype(self):
return rlt.StateInput(
After Change
super().__init__()
self.state_dim = fc_dqn.state_dim
self.action_dim = fc_dqn.action_dim
current_device = torch.cuda.current_device()
self.data_parallel = DistributedDataParallel(
fc_dqn.fc, device_ids=[current_device], output_device=current_device
)
self.fc_dqn = fc_dqn
def input_prototype(self):
return rlt.StateInput(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 13
Instances
Project Name: facebookresearch/Horizon
Commit Name: 6685375652d622dfe398ab28f8f14ed9edf8ff1d
Time: 2019-04-09
Author: jjg@fb.com
File Name: ml/rl/models/dqn.py
Class Name: _DataParallelFullyConnectedDQN
Method Name: __init__
Project Name: facebookresearch/Horizon
Commit Name: 6685375652d622dfe398ab28f8f14ed9edf8ff1d
Time: 2019-04-09
Author: jjg@fb.com
File Name: ml/rl/models/parametric_dqn.py
Class Name: _DataParallelFullyConnectedParametricDQN
Method Name: __init__
Project Name: facebookresearch/Horizon
Commit Name: 6685375652d622dfe398ab28f8f14ed9edf8ff1d
Time: 2019-04-09
Author: jjg@fb.com
File Name: ml/rl/models/world_model.py
Class Name: _DataParallelMemoryNetwork
Method Name: __init__