Adding FastAI(pytorch) as a first class citizen to the pipeline (squashed) #986
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows you to use Fast AI(pytorch) end to end in donkey car. I have tested training and driving with the simulator.
I have added a new type of model fastai_ so far linear is the only model implemented. More can be added in the future of course.
I have tried my best to emulate most of the function that Keras does but there are some idiosyncrasies between the two frameworks.
These normal training and driving commands work.
python train.py --tubs data/ --model models/fastai_linear_model.pth --type fastai_linear
python manage.py drive --model models/fastai_linear_model.pth --type fastai_linear
I do realise that this PR comes without a heads up or warning so if its rejected that's fine.
I do really like this project and the work that has been done, its just I prefer PyTorch to TensorFlow.
Any suggestions are welcome. I am new to python of this complexity so any pointers would be great.
I will also add some docs around this.
If this goes well I might also look at getting pytorch lightning into own part and working in the pipeline.
Please note this will not work with TensorRT or TF lite if there is demand I could look at this in the future.
Cheers