浏览代码

fix test

/develop/add-fire/export-discrete
Ruo-Ping Dong 4 年前
当前提交
6ae17cd0
共有 1 个文件被更改,包括 4 次插入7 次删除
  1. 11
      ml-agents/mlagents/trainers/tests/torch/test_networks.py

11
ml-agents/mlagents/trainers/tests/torch/test_networks.py


assert act.shape == (1, 1)
# Test forward
actions, probs, ver_num, mem_size, is_cont, act_size_vec = actor.forward(
actions, ver_num, mem_size, is_cont, act_size_vec = actor.forward(
# This is different from above for ONNX export
assert act.shape == (
act_size[0],
1,
) # This is different from above for ONNX export
assert act.shape == (act_size[0], 1)
assert act.shape == (1, 1)
assert act.shape == tuple(act_size)
# TODO: Once export works properly. fix the shapes here.
assert mem_size == 0
assert is_cont == int(action_type == ActionType.CONTINUOUS)
assert act_size_vec == torch.tensor(act_size)

正在加载...
取消
保存