-
Notifications
You must be signed in to change notification settings - Fork 330
Open
Description
Thanks a lot for this great mind-baffling puzzle.
I am kinda got stuck with problems 15 and 16 as it throws:
RuntimeError: expand(torch.LongTensor{[1, 5]}, size=[5]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2)
I have used the following for puzzles 15 and 16, respectively:
def bincount(a: TT["i"], j: int) -> TT["j"]:
return ones(a.shape[0])[None,:] @ ((a[:,None]==arange(j))*1)
and
def scatter_add(values: TT["i"], link: TT["i"], j: int) -> TT["j"]:
return values[None,:] @ ((link[:,None]==arange(j))*1)
While both work like a charm in the first part, the run_test
part throws a runtime error!
I can't figure out what the problem is.
Could you please help me with this issue?
Metadata
Metadata
Assignees
Labels
No labels