mlverse / torchvision

R interface to torchvision
https://torchvision.mlverse.org
Other
62 stars 15 forks source link

[request] nn_flatten #66

Closed EmKarr closed 2 years ago

EmKarr commented 2 years ago

Hello,

thank you for the brilliant torch package for R, I really like it :-)

Nevertheless, I am running into problems setting up a model via nn_sequential(), for me it seems like the R counterpart of PyTorch's nn.Flatten() is missing. If so, would it be possible to include such a function? Sequential models currently are a prerequisite for using the "innsight" package, which I would like to do, so using nn_module() is not a solution.

All the best, stay well and safe, Mike

cregouby commented 2 years ago

Hello @EmKarr, Could you elaborate a bit what is missing to cover your need that is not available between torch::torch_flatten() and tensor$flatten() ? Thanks

EmKarr commented 2 years ago

Hi cregouby, sorry, seems like I went to the wrong package to bring up the issue, should have been "torch", not "torchvision".

In torch, this issue already had beed addressed: https://github.com/mlverse/torch/issues/716#issuecomment-946117545 Thanks, best wishes, Mike