Exemple #1
0
    def __init__(self, x, y, w, h, text='x_0'):
        NodeFigure.__init__(self, x, y, w, h, 0, text)
        self.setForwardPrintable(True)

        self.setFillColor(220, 220, 220, 255)  # green
        self.figures[0].setColor(pyHAttributeColor(170, 170, 170, 255))
        self._paint()
    def __init__(self, x, y, w, h, text='w_0'):
        NodeFigure.__init__(self, x, y, w, h, 0, text)
        self.setForwardPrintable(True)

        self.setFillColor(189, 221, 187, 255)  # green
        self.figures[0].setColor(pyHAttributeColor(136, 159, 135, 255))
        self._paint()
Exemple #3
0
 def __init__(self, x, y, w, h):
     NodeFigure.__init__(self, x, y, w, h, 1, '\mathrm{\mathsf{tanh}}')
 def __init__(self, x, y, w, h):
     NodeFigure.__init__(self, x, y, w, h, 2, '\mathrm{\mathsf{add}}')
     self.set_text(self.get_operation())
Exemple #5
0
 def __init__(self, x, y, w, h):
     NodeFigure.__init__(self, x, y, w, h, 2, '\mathrm{\mathsf{max}}')
 def __init__(self, x, y, w, h):
     NodeFigure.__init__(self, x, y, w, h)
     self._internal_net = {'inputs': [], 'weight': [], 'net': []}
     self.createInternalNet()
     self.assignNetPosition()
Exemple #7
0
 def __init__(self, x, y, w, h):
     NodeFigure.__init__(self, x, y, w, h, 2, 'mse')
Exemple #8
0
 def notifyFigureChanged(self):
     NodeFigure.notifyFigureChanged(self)
Exemple #9
0
 def invert_dot_to_calculate_partial(self):
     invert = NodeFigure.invert_dot_to_calculate_partial(self)
     invert[self.get_inputs_nodes()[1]] = True
     return invert
Exemple #10
0
 def are_all_inputs_occupied(self):
     inputs_occupied = NodeFigure.are_all_inputs_occupied(self)
     variables_assigned = all(v is not None
                              for v in self._variables.values())
     return inputs_occupied and variables_assigned
Exemple #11
0
 def getHandles(self):
     h = []
     if self.node is not None:
         h = NodeFigure.getHandles(self)
     return h + self._create_variables_handles()
Exemple #12
0
 def __init__(self, x, y, w, h, num_inputs, op='op', fl='f'):
     # super
     NodeFigure.__init__(self, x, y, w, h, num_inputs, op, fl)
     self._variables = {}
Exemple #13
0
 def are_all_inputs_occupied(self):
     inputs_occupied = NodeFigure.are_all_inputs_occupied(self)
     variables_assigned = self.get_variable('neurons') is not None
     return inputs_occupied and variables_assigned
Exemple #14
0
 def forward(self):
     NodeFigure.forward(self)
     w = self.get_node()