浏览代码

Properly export memory size

/develop/add-fire/memoryclass
Ervin Teng 4 年前
当前提交
d21ffd02
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 3
      ml-agents/mlagents/trainers/torch/networks.py

3
ml-agents/mlagents/trainers/torch/networks.py


self.act_type = act_type
self.act_size = act_size
self.version_number = torch.nn.Parameter(torch.Tensor([2.0]))
self.memory_size_param = torch.nn.Parameter(torch.Tensor([0]))
self.is_continuous_int = torch.nn.Parameter(
torch.Tensor([int(act_type == ActionType.CONTINUOUS)])
)

self.encoding_size = network_settings.memory.memory_size // 2
else:
self.encoding_size = network_settings.hidden_units
self.memory_size_param = torch.nn.Parameter(torch.Tensor([self.memory_size]))
if self.act_type == ActionType.CONTINUOUS:
self.distribution = GaussianDistribution(
self.encoding_size,

正在加载...
取消
保存