Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for instance weights in dagnn.Loss #1112

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Added support for instance weights in dagnn.Loss #1112

wants to merge 6 commits into from

Conversation

Nicholas-Schaub
Copy link

With the current implementation of dagnn.Loss, it isn't possible to include pass image specific weights to a loss function. The changes in this pull request permit allow a Loss node to receive a third input that contains a set of weights. This addition does not interfere with the current implementation of dagnn.Loss.

A brief example of how to use this with the mnist data set would be to create a DAG Loss node with inputs {'prediction','labels','weights'}. A get_batch function should then return three values: 'inputs', 'labels', and 'weights', where the size of the labels matrix should be the same size as the weights matrix (which would be 1x1x1xSubBatchSize for the mnist example).

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.

1 participant