I want to export the Keras metrics(accuracy and loss) as flow variables in order to be seen by other nodes.
I tried different approaches such as add them in the FlowObjectStack class and to update them with the final values or to add them in the m_stack with the final values after the Keras Network Learner has finished its execution. Also, I tried to add them in the DLKerasDefaultTrainingConfig class and to update them from here but didn’t worked to actualize these metrics with the final values.
I tried even to create workflow variables and update them with the final results from the Keras Network Learner node and didn’t worked. Can you give me a recommendation please?
You will need to adapt it to the metrics you have used in the definition of your network. The important code to get the metrics from the network evaluation is highlighted in yellow:
I implemented this a bit too fast so, although it works, it may not be the optimal solution. At least, it should provide you with hints to improve it further and adapt it to your needs.