Set this network in training mode. After calling this method, all layers in network are in training mode, in particular, BatchNorm, Dropout, etc. Examples -------- >>> import tensorlayer as tl >>> net = tl.models.vgg16() >>> net.train()
(self)
| 506 | return _config |
| 507 | |
| 508 | def train(self): |
| 509 | """Set this network in training mode. After calling this method, |
| 510 | all layers in network are in training mode, in particular, BatchNorm, Dropout, etc. |
| 511 | |
| 512 | Examples |
| 513 | -------- |
| 514 | >>> import tensorlayer as tl |
| 515 | >>> net = tl.models.vgg16() |
| 516 | >>> net.train() |
| 517 | |
| 518 | """ |
| 519 | if self.is_train !=True: |
| 520 | self.is_train = True |
| 521 | self._set_mode_for_layers(True) |
| 522 | |
| 523 | def eval(self): |
| 524 | """Set this network in evaluation mode. After calling this method, |