Unverified Commit b544241f authored by DocGarbanzo's avatar DocGarbanzo Committed by GitHub
Browse files

Add support for all other (except KerasLatent) models: (#884)

* Factor out model from interpreter so each model can be saved and run in .h5 / .savedmodel keras format, in tflite format or in tensorrt format
* Improved KerasPilot interfaces to support the above
* Added test for all models and all interpreters (TFflite excluded for 3d CNN and TRT excluded for LSTM as these are not supported respectively)
* use expand_dims and squeeze instead of reshape and [0]

UI improvements:
* Add support for all model / interpreter combinations in training and model arena
* Add options to sync only h5, savedmodel, tflite or tensorrt pilots to car
* Fixed disabling of keyboard when switching from one screen to another

Small improvements / fixes:
* Added comment to status in train screen
* Added better error message in trt conversion
* Added seq length to lstm model str
* Added shebang to profile.py

Change on models:
* Convert LSTM and 3D-CNN model from Sequential to Functional form, because transfer learning, i.e. continuing to train an already trained model, only works in the functional form of these two models.
* Added new model KerasLinearMemory which reads in the last n actions, this facilitates smoother steering
* Added support to inference from dictionary - passing by dictionary is used in training and supports augmentation
* Renamed output layers alphabetically in order to avoid tflite bug which returns output tensors in that order

General code changes:
* Add Collator class which returns list of continuous records so sequence models, like rnn, 3dcnn, memory can be trained. Add test.
* Add comparison string class (called EqMemorizedString) to better manage printing available user options. Used in get_model_by_type.
* Reduced tolerance on keras test as we still see relative differences of 2e-5 (which is ok).
* Check either relative or absolute tolerance as untrained models might return values >> 1 in keras test
parent 8a1562e7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment