Skip to content

Type error #1

Description

@gamingsciences

Received the following error in cell 6 of the demo.ipynb:


RuntimeError Traceback (most recent call last)
in
----> 1 model.fit(X_train, epochs=1000, val=X_val)

C:\Program Files\Anaconda3\envs\my-fastai2019\lib\site-packages\dfencoder\autoencoder.py in fit(self, df, epochs, val)
566 msg = "Validating during training.\n"
567 msg += "Computing baseline performance..."
--> 568 baseline = self.compute_baseline_performance(val_in, val_df)
569 if self.verbose:
570 print(msg)

C:\Program Files\Anaconda3\envs\my-fastai2019\lib\site-packages\dfencoder\autoencoder.py in compute_baseline_performance(self, in_, out_)
540 feature = list(self.categorical_fts.items())[i][1]
541 dim = len(feature['cats']) + 1
--> 542 pred = ohe(cd, dim, device=self.device) * 5
543 codes_pred.append(pred)
544 mse_loss, bce_loss, cce_loss, net_loss = self.compute_loss(

C:\Program Files\Anaconda3\envs\my-fastai2019\lib\site-packages\dfencoder\autoencoder.py in ohe(input_vector, dim, device)
21
22 y_onehot.zero_()
---> 23 y_onehot.scatter_(1, y, 1)
24
25 return y_onehot

RuntimeError: Expected object of scalar type Long but got scalar type Int for argument #3 'index'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions