Hi K. Frank,
I want to apply the following operation-

Screen Shot 2019-09-20 at 2.41.25 PM.jpg1726×662 338 KB

According to my understanding, If I need to set custom weight using the below way criterion = torch.nn.CrossEntropyLoss(make_weight_map(mask)), I’ll be using the masks outside of data-loaders which I am really not sure will work or not?