MCPcopy
hub / github.com/tensorlayer/TensorLayer / eval

Method eval

tensorlayer/models/core.py:523–537  ·  view source on GitHub ↗

Set this network in evaluation mode. After calling this method, all layers in network are in evaluation mode, in particular, BatchNorm, Dropout, etc. Examples -------- >>> import tensorlayer as tl >>> net = tl.models.vgg16() >>> net.eval() # d

(self)

Source from the content-addressed store, hash-verified

521 self._set_mode_for_layers(True)
522
523 def eval(self):
524 """Set this network in evaluation mode. After calling this method,
525 all layers in network are in evaluation mode, in particular, BatchNorm, Dropout, etc.
526
527 Examples
528 --------
529 >>> import tensorlayer as tl
530 >>> net = tl.models.vgg16()
531 >>> net.eval()
532 # do evaluation
533
534 """
535 if self.is_train != False:
536 self.is_train = False
537 self._set_mode_for_layers(False)
538
539 def test(self):
540 """Set this network in evaluation mode."""

Calls 1

_set_mode_for_layersMethod · 0.95