Skip to content

Plot Figure 2 #39

Description

@xiqxin1

Dear author

Thank you very much for your excellent code. My recent work is also trying to identify noise labels from correct labels.

I'm curious where you output the loss values (e.g., Fig 2(a)) from your code? Is it the value of <display_loss> in the following code? If not, could you tell me how to calculate it?

def warmup(epoch, net, optimizer, dataloader, args): # make noise labels in asym and sym ways
----net.train()
----num_iter = (len(dataloader.dataset) // dataloader.batch_size) + 1
----CEloss = nn.CrossEntropyLoss()
----display_loss = []
----for batch_idx, (inputs, labels, path) in enumerate(dataloader):
--------inputs, labels = inputs.cuda(), labels.cuda()
--------optimizer.zero_grad()
--------outputs = net(inputs)
--------loss = CEloss(outputs, labels)
--------L = loss
--------display_loss.append(L)

Thanks again for your help. Looking forward to your reply.

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