I am trying to run the example Rmarkdown file in the ISLR textbook which use the fairly new package "torch" which is an interface to the C++ code for torch for deep learning. When I try to run any torch code on my windows laptop it crashes Rstudio. It does do this on my mac laptop.
Also, if I run the .R code in the original R IDE it works ok. But if I run. the .R file in Rstudio it also crashes.
I am dealing with the same issue. It started this week, with a code that I previously run normally. Any torch function, or package that use torch (in my case its brulee package), gives a fatal error in R Studio, but not in original R IDE. I'm using the following machine:
Dell Latitude 5430
12th Gen Intel(R) Core(TM) i7-1265U 1.80 GHz
RAM 32,0 GB
Windows 11
There is a solution. If you install the developer version it works,
remotes::install_github("mlverse/torch")
it now works. This takes a while to finish, since it is compiling it from source.
The developer has released a new version 0.14.2 so a windows binary version might be CRAN soon. Just check the version number before reinstalling using install.packages("torch").