Skip to content

Question about the main_utils.py . #23

@zkp0113

Description

@zkp0113

def train_one_epoch(args, net, train_loader, opt, mode, ep):
if mode == 'train':
net.train()
aff_net = Affinity().cuda()
aff_net.train()
elif mode == 'val':
net.eval()
aff_net = Affinity().cuda()
aff_net.eval()

num_examples, total_loss, loss_items, trk_met, seg_met, flow_met = epoch(args, net, train_loader, opt=opt,
                                                                         mode=mode, ep_num=ep)
total_loss = total_loss * 1.0 / num_examples

When I run the code for VoD dataset, It show me that bug as follows:

“ total_loss = total_loss * 1.0 / num_examples
ZeroDivisionError: float division by zero”

Does it any configuration that I mistake?

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