MCPcopy Create free account
hub / github.com/NVIDIA/semantic-segmentation / _assertNoGrad

Method _assertNoGrad

loss/utils.py:250–253  ·  view source on GitHub ↗
(self, variable)

Source from the content-addressed store, hash-verified

248 print('self.sum_by_non_zero_weights', self.sum_by_non_zero_weights)
249
250 def _assertNoGrad(self, variable):
251 assert not variable.requires_grad, \
252 "nn criterions don't compute the gradient w.r.t. targets - please " \
253 "mark these variables as volatile or not requiring gradients"
254
255 def forward_simple(self, input, target, return_raw_cost=False):
256 self._assertNoGrad(target)

Callers 1

forward_simpleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected