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

Bug when name of dataset is "torch_tensor" #1101

Closed
sebffischer opened this issue Sep 19, 2023 · 0 comments · Fixed by #1111
Closed

Bug when name of dataset is "torch_tensor" #1101

sebffischer opened this issue Sep 19, 2023 · 0 comments · Fixed by #1111
Assignees

Comments

@sebffischer
Copy link
Collaborator

torch::dataset("torch_tensor",
  initialize = function() {
  },
  .getitem = function(id) {
    torch::torch_tensor(1)
  },
  .length = function() 1L
)()
#> Error in cpp_tensor_dim(x$ptr): Expecting an external pointer: [type=NULL].


torch::dataset("torch_tensor1",
  initialize = function() {
  },
  .getitem = function(id) {
    torch::torch_tensor(1)
  },
  .length = function() 1L
)()
#> <torch_tensor1>
#>   Inherits from: <dataset>
#>   Public:
#>     .getitem: function (id) 
#>     .length: function () 
#>     clone: function (deep = FALSE) 
#>     initialize: function ()

Created on 2023-09-19 with reprex v2.0.2

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

Successfully merging a pull request may close this issue.

2 participants