|
@@ -36,7 +36,7 @@ using namespace QtProtobuf;
|
|
|
|
|
|
VisualizerModel::VisualizerModel(std::shared_ptr<RemoteControlClient> &client, QObject *parent) : QObject(parent)
|
|
VisualizerModel::VisualizerModel(std::shared_ptr<RemoteControlClient> &client, QObject *parent) : QObject(parent)
|
|
, m_client(client)
|
|
, m_client(client)
|
|
- , m_networkState(new NetworkState)
|
|
|
|
|
|
+ , m_networkState(new NetworkState{NetworkState::None})
|
|
{
|
|
{
|
|
m_client->getConfiguration({}, this, [this](QGrpcAsyncReply *reply) {
|
|
m_client->getConfiguration({}, this, [this](QGrpcAsyncReply *reply) {
|
|
qDeleteAll(m_layers);
|
|
qDeleteAll(m_layers);
|
|
@@ -84,9 +84,13 @@ VisualizerModel::VisualizerModel(std::shared_ptr<RemoteControlClient> &client, Q
|
|
layer->m_weights.updateValues(Dense(weights.matrix().matrix()));
|
|
layer->m_weights.updateValues(Dense(weights.matrix().matrix()));
|
|
layer->m_weightTrigger.updateLayer();
|
|
layer->m_weightTrigger.updateLayer();
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ QObject::connect(client.get(), &remotecontrol::RemoteControlClient::StateUpdated, [this](const remotecontrol::NetworkState &state) {
|
|
|
|
+ m_networkState->setState(state.state());
|
|
|
|
+ });
|
|
client->subscribeActivationsUpdates({});
|
|
client->subscribeActivationsUpdates({});
|
|
client->subscribeWeightsUpdates({});
|
|
client->subscribeWeightsUpdates({});
|
|
- client->subscribeStateUpdates({}, m_networkState);
|
|
|
|
|
|
+ client->subscribeStateUpdates({});
|
|
}
|
|
}
|
|
|
|
|
|
ValueIndicator *VisualizerModel::activation(int layer, int row)
|
|
ValueIndicator *VisualizerModel::activation(int layer, int row)
|