-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DCBTrainer: expected Tensor as element 0 in argument 0, but got str #282
Comments
@tomonodes Could you update your installation (from source) and try this: from genrl.utils import StatlogDataBandit
bandit = StatlogDataBandit(download=True)
context = bandit.reset()
from genrl.agents import NeuralLinearPosteriorAgent
agent = NeuralLinearPosteriorAgent(bandit)
context = bandit.reset()
action = agent.select_action(context)
new_context, reward = bandit.step(action)
from genrl.trainers import DCBTrainer
trainer = DCBTrainer(agent, bandit)
trainer.train(timesteps=5000, batch_size=32) |
This works for me. Feel free to close the issue(if this works). |
Installing with Building from source installs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running the StatLog shuttle example
yields an error in the training:
Printing the output at the time of transition
self.db[contexts]
is a list of strings:Full error trace:
EDIT:
Printing
idx
at the time of error yields:and fetching correspondant contexts from the agent
[agent.db.db['contexts'][x] for x in idx]
yields seemingly valid input:however, printing
self.db[contexts]
yields all strings:The text was updated successfully, but these errors were encountered: