TabularS3L icon indicating copy to clipboard operation
TabularS3L copied to clipboard

Train loss is negative

Open akhila-s-rao opened this issue 5 months ago • 1 comments

Hi,

When doing first phase training over DAE and VIME (using unlabeled data), I got negative CrossEntropyLoss for the categorical features which resulted in a negative training and validation loss. This lead me to print the predictions for the categorical features and it was a Tensor of size [batch_size, num_categoricals] However this isn't the expected input to CrossEntropyLoss from PyTorch which expects logits in a vector of size num_classes. I don't quite understand in your implementation, how the reconstruction of categorical features work ? Am I missing something here ? As I understand the train_loss should not be negative (which I see for DAE and VIME)

This is what printing the predictions over categorical features looks like (functional/dae.py) cat feature preds: tensor([[ 1.5704], [-0.6245], [ 0.4721], [-0.1746], [ 1.0408], [ 2.5116], [ 1.1048], [-1.1651], [ 4.2188], [ 0.7524], [-0.1088],

Help is appreciated ! Thanks !! :)
P.S. Super useful project !

akhila-s-rao avatar Sep 09 '24 19:09 akhila-s-rao