Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supervised training issue #147

Open
Antros89 opened this issue Feb 2, 2024 · 1 comment
Open

Supervised training issue #147

Antros89 opened this issue Feb 2, 2024 · 1 comment

Comments

@Antros89
Copy link

Antros89 commented Feb 2, 2024

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 ?

@cregouby
Copy link
Collaborator

cregouby commented Feb 3, 2024

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants