浏览代码

[skip ci] adding statement to import rank

/trainer-plugin
Anupam Bhatnagar 4 年前
当前提交
90435403
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 4
      ml-agents/mlagents/trainers/learn.py
  2. 2
      ml-agents/mlagents/trainers/saver/tf_saver.py

4
ml-agents/mlagents/trainers/learn.py


new_initializers = all_initializers - original_initializers
new_trainers = all_trainers - original_trainers
print(f"Found %s new initializers" % len(new_initializers))
print(f"Found %s new trainers" % len(new_trainers))
print(f"Found {len(new_initializers)} new initializers")
print(f"Found {len(new_trainers)} new trainers")
print(all_initializers)
print(new_initializers)
print(all_trainers)

2
ml-agents/mlagents/trainers/saver/tf_saver.py


from mlagents.trainers.policy.tf_policy import TFPolicy
from mlagents.trainers.optimizer.tf_optimizer import TFOptimizer
from mlagents.trainers import __version__
from mlagents.tf_utils.globals import get_rank
logger = get_logger(__name__)

self.graph = None
self.sess = None
self.tf_saver = None
self.rank = get_rank()
def register(self, module: Union[TFPolicy, TFOptimizer]) -> None:
if isinstance(module, TFPolicy):

正在加载...
取消
保存