srush / Tensor-Puzzles

Solve puzzles. Improve your pytorch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem 18 throwing unexplainable error

ignasa007 opened this issue · comments

I was working on problem 18 and it is throwing an assertion error when checking the equality between the target and the function output. However, the two tensors seem to be equal. Am I missing something?
Screenshot 2022-07-14 at 4 11 59 AM

This is our fault. All the other problems are integers so torch.equal works. However for this one it is a float so it should be ".almost_equal". But your answer looks right.

Should now be fixed on reload.