actions = torch.randn(num_scenes, 2)6
cpu_actions = nn.Sigmoid()(actions).numpy()
global_goals = [[int(action[0] local_w),
int(action[1] * local_h)]
for action in cpu_actions]
global_goals = [[min(x, int(local_w - 1)),
min(y, int(local_h - 1))]
for x, y in global_goals]
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
I saw this code in main.py, and I was confused. I understand that the global_goals variable should store the global goal, the decision made in the previous step. But the global_goals variable I see in main.py is all randomly selected. Why?
actions = torch.randn(num_scenes, 2)6 cpu_actions = nn.Sigmoid()(actions).numpy() global_goals = [[int(action[0] local_w), int(action[1] * local_h)] for action in cpu_actions] global_goals = [[min(x, int(local_w - 1)), min(y, int(local_h - 1))] for x, y in global_goals] """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" I saw this code in main.py, and I was confused. I understand that the global_goals variable should store the global goal, the decision made in the previous step. But the global_goals variable I see in main.py is all randomly selected. Why?