|
@@ -70,8 +70,9 @@ ApplicationWindow {
|
|
|
color: "#00ffffff"
|
|
|
Rectangle {
|
|
|
id: neuron
|
|
|
- anchors.fill: parent
|
|
|
property ValueIndicator activation: visualizerModel.activation(layerIndex, model.index)
|
|
|
+
|
|
|
+ anchors.fill: parent
|
|
|
radius: 15
|
|
|
color: {
|
|
|
var alpha = activation.value
|
|
@@ -100,7 +101,13 @@ ApplicationWindow {
|
|
|
var coordPrev = layerRepeater.itemAt(i - 1).mapToItem(root.contentItem, neuronPrev.x + neuronPrev.width/2, neuronPrev.y + neuronPrev.height/2)
|
|
|
var angle = Math.atan2(coordPrev.y - coord.y, coordPrev.x - coord.x) * 180 / Math.PI
|
|
|
var length = Math.sqrt(Math.pow(coordPrev.x - coord.x, 2) + Math.pow(coordPrev.y - coord.y, 2))
|
|
|
- connection.createObject(bottomLayer, {x: coord.x, y: coord.y, width: length, angle: angle })
|
|
|
+ connection.createObject(bottomLayer, {
|
|
|
+ x: coord.x,
|
|
|
+ y: coord.y,
|
|
|
+ width: length,
|
|
|
+ angle: angle,
|
|
|
+ weight: visualizerModel.weight(i, j, k),
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -111,13 +118,18 @@ ApplicationWindow {
|
|
|
id: connection
|
|
|
Rectangle {
|
|
|
property alias angle: trans.angle
|
|
|
+ property ValueIndicator weight: null
|
|
|
+
|
|
|
transformOrigin: Item.Left
|
|
|
transform: Rotation {
|
|
|
id: trans
|
|
|
}
|
|
|
|
|
|
height: 1
|
|
|
- color: "#55ffffff"
|
|
|
+ color: {
|
|
|
+ var color = weight.value
|
|
|
+ Qt.rgba(color, 0, 1.0/color, color > 0 ? 0.5 : 0.0)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|