Menu

Helper Module for Deep Learning.

Module that provides common losses.

class pynet.losses.common.MSELoss(concat=False)[source]

Calculate the Mean Square Error loss between I and J.

__init__(concat=False)[source]

Init class.

Parameters

concat: bool, default False

if set asssume that the target image J is a concatenation of the moving and fixed.

debug(name, tensor)[source]

Print debug message.

Parameters

name: str

the tensor name in the displayed message.

tensor: Tensor

a pytorch tensor.

class pynet.losses.common.NCCLoss(concat=False, win=None)[source]

Calculate the normalize cross correlation between I and J.

__init__(concat=False, win=None)[source]

Init class.

Parameters

concat: bool, default False

if set asssume that the target image J is a concatenation of the moving and fixed.

win: list of in, default None

the window size to compute the correlation, default 9.

class pynet.losses.common.PCCLoss(concat=False)[source]

Calculate the Pearson correlation coefficient between I and J.

__init__(concat=False)[source]

Init class.

Parameters

concat: bool, default False

if set asssume that the target image J is a concatenation of the moving and fixed.

debug(name, tensor)[source]

Print debug message.

Parameters

name: str

the tensor name in the displayed message.

tensor: Tensor

a pytorch tensor.

class pynet.losses.common.RCNetLoss[source]

RCNet Loss function.

This loss needs intermediate layers outputs. Use a callback function to set the ‘layer_outputs’ class parameter before each evaluation of the loss function. If you use an interface this parameter is updated automatically?

PCCLoss

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

class pynet.losses.common.VMILoss[source]

Variational Mutual information loss function.

Reference: http://bayesiandeeplearning.org/2018/papers/136.pdf -

https://discuss.pytorch.org/t/help-with-histogram-and-loss- backward/44052/5

get_negative_expectation(q_samples, average=True)[source]
get_positive_expectation(p_samples, average=True)[source]

Follow us

© 2019, pynet developers .
Inspired by AZMIND template.