mlverse / torch

R Interface to Torch
https://torch.mlverse.org
Other
489 stars 64 forks source link

R session Aborted #1191

Open chri002 opened 2 weeks ago

chri002 commented 2 weeks ago

I have tried to follow the basic torch guide: Guess the correlation; but whenever I get to the point of running the R training, an error ‘R session aborted’ returns.

sebffischer commented 2 weeks ago

You should provide the code you are trying to run as it is otherwise hard to help you.

chri002 commented 2 weeks ago

The tutorial, and code, that I followed is "guess the correlation" from "https: //torch.mlverse.org /start /guess_the_correlation /". The error message is created when executing the following command: fitted <- net %>% setup( loss = function(y_hat, y_true) nnf_mse_loss(y_hat, y_true$unsqueeze(2)), optimizer = optim_adam ) %>% fit(train_dl, epochs = 10, valid_data = test_dl)

The other commands seem to work, I can run an inference, build the model, move it between RAM and VRAM. But when I run the training it seems to collapse. I hope it can be resolved.