Skip to content

RuntimeError: expected scalar type Double but found Float #998

Answered by wjmaddox
A-ep93 asked this question in Q&A
Discussion options

You must be logged in to vote

This is because this line is causing your candidates to be generated in double rather than float precision:

bounds=torch.tensor([[1,0],[10,0.5]],dtype=torch.float64)
# change to 
bounds=torch.tensor([[1,0],[10,0.5]],dtype=torch.float)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by A-ep93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants