def __init__(self, main_program, inputs, outputs, parameters=None):
    super(PartialProgramLayer, self).__init__()
    self._inputs = NestSequence(inputs)
    self._outputs = NestSequence(outputs, need_check=True)
    self._params = (parameters if (parameters is not None) else [])
    self._origin_main_program = self._verify_program(main_program)
    self._inner_scope = core.Scope()
    self._double_grads = self._get_double_grads(self._origin_main_program)
    self.training = True
def __init__(self, main_program, inputs, outputs, parameters=None):
    super(PartialProgramLayer, self).__init__()
    self._inputs = NestSequence(inputs)
    self._outputs = NestSequence(outputs, need_check=True)
    self._params = (parameters if (parameters is not None) else [])
    self._origin_main_program = self._verify_program(main_program)
    self._inner_scope = core.Scope()
    self._double_grads = self._get_double_grads(self._origin_main_program)
    self.training = True