You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was running TabM_D_Classifier when the error occurred, and changing the input to .float() resolved it. However, while using TabR_S_D_Classifier today, I ran into the following error:
RuntimeError: Expected tensor for argument #1 'indices' to have one of the following scalar types: Long, Int; but got torch.FloatTensor instead (while checking arguments for embedding)
I believe I have now implemented a fix that handles both TabM_D_Classifier and TabR_S_D_Classifier correctly (see last commit). Before merging the changes, though, it would be great if you could test it with your data as well — just to make sure the fix does not resolve one issue while introducing another. Thanks!
TabM should not be using this code at all. Can you provide a minimal reproducible example that triggers an error with the old code?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed an error in
TabrModelwhenLongTensoris passed into a Linear layer expectingFloatTensor:This occurs in the
forward()method ofTabrModelat the line:Here,
candidate_y[...]is aLongTensor, which causes a type mismatch when passed intonn.Linear, which expects aFloatTensor.