Skip to content

Added support for instance weights in dagnn.Loss#1112

Open
Nicholas-Schaub wants to merge 6 commits intovlfeat:masterfrom
Nicholas-Schaub:LossWeights
Open

Added support for instance weights in dagnn.Loss#1112
Nicholas-Schaub wants to merge 6 commits intovlfeat:masterfrom
Nicholas-Schaub:LossWeights

Conversation

@Nicholas-Schaub
Copy link
Copy Markdown

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