Neural Symbolic Machines is a framework to integrate neural networks and symbolic representations using reinforcement learning, with applications in program synthesis and semantic parsing.
Apache License 2.0
377
stars
69
forks
source link
`scale_rewards` function uses undefined variables #2
def scale_rewards(samples, scale):
"""Weight each samples with the weight. Reflected on rewards."""
scaled_rewards = [list(scale * np.array(s.rewards)) for s in samples]
new_samples = []
for s, p in zip(samples, scaled_probs):
new_samples.append(
sample._replace(traj=traj._replace(rewards=scaled_rewards)))
return new_samples
In the function in agent_factory.py, the variables sample and scaled_probs are undefined.
In the function in agent_factory.py, the variables
sample
andscaled_probs
are undefined.