Beispiel #1
0
    def __init__(self, parent=None, **kwargs):
        Flowchart.__init__(self, **kwargs)
        self.parent = parent
        self.inputNode.graphicsItem().hide()
        self.outputNode.graphicsItem().hide()
        self._nodeCopyPasteBuffer = None

        self.widget().chartWidget.hoverOver = self.hoverOver  # this thing is not working....
Beispiel #2
0
    def __init__(self, parent=None, **kwargs):
        Flowchart.__init__(self, **kwargs)
        self.parent = parent
        self.inputNode.graphicsItem().hide()
        self.outputNode.graphicsItem().hide()
        self._nodeCopyPasteBuffer = None

        self.widget(
        ).chartWidget.hoverOver = self.hoverOver  # this thing is not working....
Beispiel #3
0
    def __init__(self, prototxt=None, weights=None):
        """
        A flowchart that enables visualizing, editing, and running a caffe neural network model

        :param prototxt: string
            Optional path to a caffe prototxt file, which will be used as the initial model for the network
        :param weights: string
            Optional path to a caffe caffemodel file, which will be used as the initial weights for the network
        """

        self.nodeList = []
        self.displayNodes = {}
        self.netNeedsUpdate = True
        self.netNeedsEval = True
        self.holdUpdateConnects = True
        self.nextData = None
        Flowchart.__init__(self, terminals={
            'dataIn': {'io': 'in'},
            'dataOut': {'io': 'out'}
        })

        if prototxt is None:
            self.proto = NetProto()
            self.layerList = self.proto.layer
            self.plotList = {}
        else:
            self.proto = parsePrototxt(prototxt, 'net')
            self.layerList = self.proto.layer
            # for old proto format
            if len(self.layerList) == 0:
                self.layerList = self.proto.layers

        self.weights = weights

        for proto in self.layerList:
            print proto

        self.setupNodes()

        fcw = self.widget().chartWidget
        fcw.viewDock.sizePolicy().setHorizontalPolicy(QtGui.QSizePolicy.Maximum)

        fcw.moveDock(fcw.hoverDock, 'bottom', fcw.viewDock)
        fcw.moveDock(fcw.selDock, 'right', fcw.hoverDock)