MCPcopy Create free account
hub / github.com/MontaEllis/Pytorch-Medical-Segmentation / make_one_hot

Function make_one_hot

loss_function.py:46–60  ·  view source on GitHub ↗

Convert class index tensor to one hot encoding tensor. Args: input: A tensor of shape [N, 1, *] num_classes: An int of number of class Returns: A tensor of shape [N, num_classes, *]

(input, num_classes)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected