Tensor-Puzzles icon indicating copy to clipboard operation
Tensor-Puzzles copied to clipboard

Solve puzzles. Improve your pytorch.

Results 13 Tensor-Puzzles issues
Sort by recently updated
recently updated
newest added

Thanks so much for these puzzles, I really enjoyed them. I have a working solution for each one but I'm curious if there are other approaches. In particular: I solved...

I'm trying to solve puzzles 4 and 5 by using the predefined `where(q, a, b)` function, which expects `q` to be a boolean tensor. To arrive at a boolean tensor,...

Thanks a lot for this great mind-baffling puzzle. I am kinda got stuck with problems 15 and 16 as it throws: ```python RuntimeError: expand(torch.LongTensor{[1, 5]}, size=[5]): the number of sizes...

I'm solving one of first puzzles: ```python def sum_spec(a, out): out[0] = 0 for i in range(len(a)): out[0] += a[i] def sum(a: TT["i"]) -> TT[1]: return (a @ ones(len(a))) test_sum...

**The problem:** If the user's solution to a puzzle is a rank-0 tensor (eg, `tensor(6)`), running `make_test` results in a cryptic TypeError many levels deep in the SVG-rendering code. This...

I nominate `amin` (or `amax`), `nonzero`, and, `sort`.

jaxtyping is a new, improved, and maintained version of torchtyping by the same author (patrick kidger). When used with beartype, jaxtyping can inform the user of shape mismatch errors at...

pad_to function can make easier implementation of the compress function, it took me a day to find out. I suggest to switch the order of pad_to with compress function. I...

Typo has been corrected Renamed where to white