Classification callbacks

Note: Starting in Maximo® Visual Inspection 8.7, custom models are not supported. Custom models are still supported in Maximo Visual Inspection 8.6 and earlier versions.

Use this callback when the custom model is trained for image classification.

def updateTrainMetrics(current_iter, max_iter, loss, epoch)

Handler for status updates from the training process. This handler should be called actively by your custom code to post the training status to the IBM® Maximo Visual Inspection user interface.

Input
current_iter (int)
Current iteration in the epoch
max_iter (int)
Maximum iterations in one epoch
loss (float)
Training loss
epoch (int)
Current training epoch
Example

monitor_handler.updateTrainMetrics(current_iter, max_iter, loss, epoch)

Output
None

def updateTestMetrics(current_iter, accuracy, loss, epoch)

Handler for status updates from the testing process. This handler should be called actively by your custom code to post the testing status to the IBM Maximo Visual Inspection user interface.

Input
current_iter (int)
Current iteration in the epoch
accuracy (float)
Testing accuracy
loss (float)
Training loss
epoch (int)
Current training epoch
Example
monitor_handler.updateTrainMetrics(iter_num, accuracy, loss, epoch_num)
Output
None