tabnet icon indicating copy to clipboard operation
tabnet copied to clipboard

Supervised training issue

Open Antros89 opened this issue 1 year ago • 1 comments

I am following the unsupervised vignette and I can pretrain tabnet without any problems. When I call though : model_fit <- tabnet_fit(rec, train , tabnet_model = mod, from_epoch=40, valid_split = 0.2, epochs = 50, verbose=TRUE) I am getting this error: Error in cpp_tensor_requires_grad(self$ptr) : external pointer is not valid.

The problem seems to be with the tabnet_model = mod. Any ideas how to fix this ?

Antros89 avatar Feb 02 '24 11:02 Antros89

Hello @Antros89, external pointer is not valid means R loose the connection with the tensor managed by libtorch. This may have multiple root cause. Are you able to publish a ReprEx ? And give a bit of context (CPU or GPU ? OS family ? version of Tabnet ? Is the mod object correct (i.e. existing? beeing a proper tabnet.pretrain object? and are you able to print it and autoplot() it ?...

The scenario you expect is part of the test strategy, so it works on many OS with or without GPU...

Hope it helps,

cregouby avatar Feb 03 '24 10:02 cregouby