From 1511e16d604029cada8fa2172ac963e5261fa0c2 Mon Sep 17 00:00:00 2001 From: taniya-das Date: Wed, 6 Nov 2024 17:16:23 +0100 Subject: [PATCH] add another example, fix location in Readme.md --- README.md | 2 +- {examples => docs/Examples}/tf_transfer_learning.py | 4 +++- docs/index.md | 2 +- mkdocs.yml | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) rename {examples => docs/Examples}/tf_transfer_learning.py (91%) diff --git a/README.md b/README.md index 855ef05..8e3d708 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ print('URL for run: %s/run/%d' % (openml.config.server, run.run_id)) ``` -Note: The input layer of the network should be compatible with OpenML data output shape. Please check [examples](/examples/) for more information. +Note: The input layer of the network should be compatible with OpenML data output shape. Please check [examples](/docs/Examples/) for more information. Additionally, if you want to publish the run with onnx file, then you must call ```openml_pytorch.add_onnx_to_run()``` immediately before ```run.publish()```. diff --git a/examples/tf_transfer_learning.py b/docs/Examples/tf_transfer_learning.py similarity index 91% rename from examples/tf_transfer_learning.py rename to docs/Examples/tf_transfer_learning.py index 701a5c1..9f0643f 100644 --- a/examples/tf_transfer_learning.py +++ b/docs/Examples/tf_transfer_learning.py @@ -2,7 +2,9 @@ Tensorflow image classification using pre-trained model example ================== -An example of a tensorflow network that classifies indoor scenes images. +An example of a tensorflow pre-trained network that classifies indoor scenes images, where all layers are trained. +For smaller datasets or datasets similar to the dataset the base model was trained on, +it is advisable to freeze pre-trained network, and only train custom layers. """ import openml diff --git a/docs/index.md b/docs/index.md index 855ef05..8e3d708 100644 --- a/docs/index.md +++ b/docs/index.md @@ -47,7 +47,7 @@ print('URL for run: %s/run/%d' % (openml.config.server, run.run_id)) ``` -Note: The input layer of the network should be compatible with OpenML data output shape. Please check [examples](/examples/) for more information. +Note: The input layer of the network should be compatible with OpenML data output shape. Please check [examples](/docs/Examples/) for more information. Additionally, if you want to publish the run with onnx file, then you must call ```openml_pytorch.add_onnx_to_run()``` immediately before ```run.publish()```. diff --git a/mkdocs.yml b/mkdocs.yml index bf4cee9..7e19a2a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -62,5 +62,6 @@ nav: - "Performance Check Image Classification Task": "Examples/tf_image_classification_sanity_check.py" - "Image Classification Task on Big Dataset": "Examples/tf_image_classification_Indoorscenes_dataset.py" - "Pretrained Image Classification Example": "Examples/tf_pretrained_model_Indoorscenes_dataset.py" + - "Pretrained Image Classification on Big Dataset": "Examples/tf_transfer_learning.py" # - "Limitations of the API": "Limitations of the API.md" \ No newline at end of file