Completed
Push — master ( eef17b...3c911b )
by Raphael
01:37
created

TrainingController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 16
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A bind() 0 5 1
A invoke() 0 5 1
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
class TrainingController(object):
5
    """
6
    Abstract class of training controllers.
7
    """
8
9
    def bind(self, trainer):
10
        """
11
        :type trainer: deepy.trainers.base.NeuralTrainer
12
        """
13
        self._trainer = trainer
14
15
    def invoke(self):
16
        """
17
        Return True to exit training.
18
        """
19
        return False