コード例 #1
0
 def add_auxiliary_variable(self, variable, roles=None, name=None):
     if name:
         variable.name = _variable_name(self.application.brick.name,
                                        self.application.name, name)
         variable.tag.name = name
         name = None
     add_annotation(variable, self.application.brick)
     return super(ApplicationCall,
                  self).add_auxiliary_variable(variable, roles, name)
コード例 #2
0
ファイル: base.py プロジェクト: EloiZ/DeepCube
 def add_auxiliary_variable(self, variable, roles=None, name=None):
     if name:
         variable.name = _variable_name(
             self.application.brick.name, self.application.name, name)
         variable.tag.name = name
         name = None
     add_annotation(variable, self.application.brick)
     return super(ApplicationCall, self).add_auxiliary_variable(
         variable, roles, name)
コード例 #3
0
 def copy_and_tag(variable, role, name):
     """Helper method to copy a variable and annotate it."""
     copy = variable.copy()
     # Theano name
     copy.name = _variable_name(brick.name, self.name, name)
     add_annotation(copy, brick)
     add_annotation(copy, call)
     # Blocks name
     copy.tag.name = name
     add_role(copy, role)
     return copy
コード例 #4
0
ファイル: base.py プロジェクト: EloiZ/DeepCube
 def copy_and_tag(variable, role, name):
     """Helper method to copy a variable and annotate it."""
     copy = variable.copy()
     # Theano name
     copy.name = _variable_name(brick.name, self.name, name)
     add_annotation(copy, brick)
     add_annotation(copy, call)
     # Blocks name
     copy.tag.name = name
     add_role(copy, role)
     return copy
コード例 #5
0
 def _setitem(self, key, value):
     if isinstance(value, Variable):
         add_role(value, PARAMETER)
         add_annotation(value, self.brick)
コード例 #6
0
ファイル: base.py プロジェクト: EloiZ/DeepCube
 def _setitem(self, key, value):
     if isinstance(value, Variable):
         add_role(value, PARAMETER)
         add_annotation(value, self.brick)