浏览代码

Merge branch 'develop-add-fire' of github.com:Unity-Technologies/ml-agents into develop-add-fire-export

/develop/add-fire/export-discrete
Ervin Teng 4 年前
当前提交
ffbdc0e2
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 2
      ml-agents/mlagents/trainers/torch/encoders.py
  2. 7
      ml-agents/mlagents/trainers/trainer_controller.py

2
ml-agents/mlagents/trainers/torch/encoders.py


kernel_init=Initialization.KaimingHeNormal,
kernel_gain=1.0,
)
self.sequential = nn.Sequential(*self.layers)
self.sequential = nn.Sequential(*layers)
def forward(self, visual_obs):
batch_size = visual_obs.shape[0]

7
ml-agents/mlagents/trainers/trainer_controller.py


from mlagents.trainers.agent_processor import AgentManager
from mlagents.tf_utils.globals import get_rank
try:
import torch
except ModuleNotFoundError:
torch = None # type: ignore
class TrainerController:
def __init__(

self.kill_trainers = False
np.random.seed(training_seed)
tf.set_random_seed(training_seed)
if torch is not None:
torch.manual_seed(training_seed)
self.rank = get_rank()
@timed

正在加载...
取消
保存