Skip to content

ZeroDivisionError: division by zero #4

@Rwkun

Description

@Rwkun

hello, I am trying to use main_preloaded.py to train the Screen model. I have obtained the embeddings for both the GUI model and layout autoencoder, according to your instructions. But I got an error when I train the Screen model:
The command of mine is :python main_preloaded.py -d rico -s 128 -b 256 -o output_screen/
dataset.len 0 0%| | 0/10 [00:00<?, ?it/s]-------- 0 train loss: EP_train:0: || 0/0 [00:00<?, ?it/s] 0%| | 0/10 [00:00<?, ?it/s] Traceback (most recent call last): File "main_preloaded.py", line 140, in <module> train_loss = trainer.train(epoch) File "/cluster/home/ranwei/code/Screen2Vec-master/pretrainer.py", line 45, in train loss = self.iteration(epoch, self.train_data) File "/cluster/home/ranwei/code/Screen2Vec-master/pretrainer.py", line 131, in iteration return total_loss/total_data ZeroDivisionError: division by zero

It seems that the dataloader could not load the data successfully. How can i solve this problem, can you give me some advices? Thank you!

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