Spaces:
Sleeping
Sleeping
File size: 238 Bytes
5c5b473 | 1 2 3 4 5 6 7 8 9 10 | def evaluate(agent, env):
correct = 0
total = len(env.data)
for text, label in env.data:
action = agent.choose_action(text)
if action == label:
correct += 1
print("Accuracy:", correct / total) |