From b8080a105aa56aef52d06b9790025f1f44af99e2 Mon Sep 17 00:00:00 2001 From: hsharif3 <hsharif3@illinois.edu> Date: Wed, 24 Mar 2021 21:54:53 +0000 Subject: [PATCH] Update Keras README.md --- hpvm/test/dnn_benchmarks/keras/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hpvm/test/dnn_benchmarks/keras/README.md b/hpvm/test/dnn_benchmarks/keras/README.md index 34b7a7804d..09259a722e 100644 --- a/hpvm/test/dnn_benchmarks/keras/README.md +++ b/hpvm/test/dnn_benchmarks/keras/README.md @@ -111,6 +111,20 @@ These are described here: Trains the Keras model constructed in `buildModel` and is expected to return the trained keras model - training parameters should be tuned here. +### Directly using Keras Frontend API + +Alternate to extending the `Benchmark` class, users may directly invoke the Keras Frontend API. This can be done as: + +```python + +from keras_frontend.approxhpvm_translator import translate_to_approxhpvm + +# Construct and train your Keras Model (or load pre-trained weights) + +translate_to_approxhpvm(model, data_dir, src_dir, test_data, test_labels, tune_data, tune_labels, batch_size, num_classes) + +``` + ## Automated Tests -- GitLab