Skip to content

Rec loss: nan #29

@GareemaRanjan

Description

@GareemaRanjan

Describe the bug
I am using ETM for topic modelling for a dataset of 50K documents. I am running the model multiple times (with random seed values) to find the appropriate value of K for my data. Sometimes, the model gives me the loss values as nan for the same K. This is a little random and I am not able to track why this happens.

INFO:root:Epoch 56 - Learning Rate: 0.005 - KL theta: nan - Rec loss: nan - NELBO: nan
INFO:root:Epoch 57 - Learning Rate: 0.005 - KL theta: nan - Rec loss: nan - NELBO: nan

Once this happens, for all the epochs in that run, the loss values are nan.

Reproduction example
Here is how I am using the model:

etm_instance = ETM(
vocabulary,
num_topics=k,
epochs=100,
debug_mode=True,
seed=random_seed,
)

I am new to topic modelling (and machine learning). Is there something I am missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions