dfalbel / torch

torch from R!
http://dfalbel.github.io/torch
Other
50 stars 5 forks source link

tch_prod #35

Closed Athospd closed 5 years ago

Athospd commented 5 years ago

This PR implements tch_prod and its method.

Just a note: torch::Tensor::prod() shows 5 ways to pass parameters. The 3rd and 5th differs only by keepdim type: NULL or bool.

I chose to check it at R side and always pass keepdim as bool when dim is not null.

I checked the outputs with pytorch.