Hi Aurelien,
Thanks for the comprehensive guide. The python node amd ML libraries are working fine together.
I'm creating a python function that defines a deep learning model and load pretrained weights in it, and returns the loaded model. However, we need to specify the 'return type' in the python node, but LabVIEW only supports numeric, string, boolean, and clusters as "return data type", and the model's datatype doesn't fit under any of the supported types. When I check the datatype of model in python, it shows 'tflearn.models.dnn.DNN'. Is there anyway to define a custom return type in python node? or any other way to get around this problem?
On the other hand, when I define a python function which loads the weights into the model and then make prediction on a test example, the return variable is an array of predictions whose return type is an array of float32, which is supported by python node. Hence, this works well. The downside to this is that every time this python node runs in a loop, it loads the weights into the model from scratch and then makes prediction, which is quite a time extensive process.
To avoid reloading the weights every time, I planned to define a separate function outside the loop for loading the model only once , and another function inside the loop for making predictions only using the preloaded model. However, due to the ambiguity in specifying the return type of the loaded model in python node, i'm unable to execute it.
Any suggestions and help would be greatly appreciated. Thanks