Skip to content

Feature/losses#2

Merged
IvanHahan merged 8 commits intomasterfrom
feature/losses
Dec 2, 2021
Merged

Feature/losses#2
IvanHahan merged 8 commits intomasterfrom
feature/losses

Conversation

@naurlaunim
Copy link
Collaborator

No description provided.

not_padding = not_padding.unsqueeze(0)
pred_class = pred_class[not_padding]
pred_class = pred_class.reshape([1, 2, int(pred_class.size()[0] / 2)])
return label_class, pred_class No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

шот сложное тут творишь. плюс, захардкожены классы. ты либо все сделай флат, отфильтруй -1, а потом экспанд дименшин сделай, чтобы количество размерностей подходящее было. Либо в лоссах делай умножение на 0, в позициях для -1

loss = lambda out, labels: loss_ce(out, labels) + loss_dice(out, labels)
return loss

##############################################################################
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лямбды тут не нужно использовать. ты ж можешь просто присвоить саму функцию с лоссом.

mrybakova and others added 4 commits December 1, 2021 14:13
# Conflicts:
#	models/losses.py
#	models/mesh_classifier.py
@IvanHahan IvanHahan merged commit de085bb into master Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants