Navigation
API > API/Plugins > API/Plugins/MLDeformerFrameworkEditor > API/Plugins/MLDeformerFrameworkEditor/FMLDeformerEditorModel
Description
Launch the training. This gets executed when the Train button is pressed. Training can succeed, or be aborted, and there can be training errors. The result is returned by this method. You generally want to implement a class inherited from MLDeformerTrainingModel, and put a Train function inside of that, which you then execute through the TrainModel function.
A code example:
ETrainingResultFYourEditorModel::Train(){returnTrainModel
That will internally call the Train function of your python class. Now inside your Python class you do something like:
@unreal.uclass()classYourModelPythonTrainingModel(unreal.YourTrainingModel):@unreal.ufunction(override=True)deftrain(self):#...dotraininghere...return0#Avalueof0issuccess,1meansaborted,seeETrainingResult.
Calling the TrainModel function inside will then trigger the Python train method to be called.
Derived Overrides
| Name | Train |
| Type | function |
| Header File | /Engine/Plugins/Animation/MLDeformer/MLDeformerFramework/Source/MLDeformerFrameworkEditor/Public/MLDeformerEditorModel.h |
| Include Path | #include "MLDeformerEditorModel.h" |
| Source | /Engine/Plugins/Animation/MLDeformer/MLDeformerFramework/Source/MLDeformerFrameworkEditor/Private/MLDeformerEditorModel.cpp |
virtual ETrainingResult Train()
The training result.