diff --git a/paddle/fluid/train/custom_trainer/feed/scripts/create_programs.py b/paddle/fluid/train/custom_trainer/feed/scripts/create_programs.py index 9c154b901f8a3379c9a53a4307662367452fe583..3c014683e92684195e8c0340a29558eea72606a4 100644 --- a/paddle/fluid/train/custom_trainer/feed/scripts/create_programs.py +++ b/paddle/fluid/train/custom_trainer/feed/scripts/create_programs.py @@ -19,6 +19,27 @@ class ModelBuilder: """ Attributes: _save_path: Save path of programs + + def _inference(): + Build inference network(without loss and optimizer) + **This function is declared in the network_desc_path file, and will be set in initialize()** + + Returns: + list: inputs + and + list: outputs + pass + + def _loss_function(outputs): + **This function is declared in the network_desc_path file, and will be set in initialize()** + Args: + outputs: the second result of inference() + + Returns: + Variable: loss + and + list: labels + pass """ def initialize(self, network_desc_path, save_path=None): @@ -68,31 +89,6 @@ class ModelBuilder: return True - def _inference(): - """Build inference network(without loss and optimizer) - **This function is declared in the network_desc_path file, and will be set in initialize()** - - Returns: - list: inputs - and - list: outputs - """ - pass - - def _loss_function(outputs): - """ - **This function is declared in the network_desc_path file, and will be set in initialize()** - - Args: - outputs: the second result of inference() - - Returns: - Variable: loss - and - list: labels - """ - pass - def build_and_save(self): """Build programs and save to _save_path """