Sören Brunk

Results 85 comments of Sören Brunk

> I have made that last parameter an implicit. I did the same for `logSoftmax`. If we do this, we avoid having to provide that last parameter. It seems that...

> The `Tensor`class has no assignment operator. I also did not find a method for this in the JavaCPP code. How should one go about assigning a value? The C++...

It looks like the compiler gets confused by the overloaded variants of `mean` for whatever reason. I've seen this in other places with different generic overloads. I realized that the...

> I need the use of [Dropout](https://pytorch.org/docs/stable/generated/torch.nn.Dropout.html?highlight=dropout#torch.nn.Dropout). In Python this seems to return a constructor of sorts (did not check), which can then be applied to a `Tensor`. > >...

> So in `torch.nn.modules.Module` something like this should work: > > ```scala > def registerB[D nativeModule.register_buffer(n, t.native) > t > ``` > > However, as an example: > > ```scala...

@hmf I have a hunch (not tested). Could you try to wrap your `Sequential` in your feed forward module inside a `register` as well like so: https://github.com/sbrunk/storch/blob/5e1fdf2a7b2d985a58ee7a6f8405cd8d443426b4/examples/src/main/scala/gpt/BiGram.scala#L1316-L1326 ```diff - val...

Looks like it's worse actually. This weird promotion rule not only applies to scalar values, but also to scalar tensors (tensors with zero dimensions): > If a zero-dimension tensor operand...

> @sbrunk Out of curiosity. Why do you say the last example is wrong? Isn't this a case of [broadcasting](https://pytorch.org/docs/stable/notes/broadcasting.html)? The result is correct, but our **promoted type** is wrong....

Done for Laika (introductory docs) in #12 with KaTeX, but still needs to be done for Scaladoc.

It might have to do something with the fact that split returns a [view](https://pytorch.org/docs/stable/tensor_view.html). https://pytorch.org/docs/stable/generated/torch.split.html: > Splits the tensor into chunks. Each chunk is a view of the original tensor....