You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/using_mxnet.rst
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -689,7 +689,6 @@ Using ``transform_fn``
689
689
''''''''''''''''''''''
690
690
691
691
If you would rather not structure your code around the three methods described above, you can instead define your own ``transform_fn`` to handle inference requests.
692
-
This will override any implementation of ``input_fn``, ``predict_fn``, or ``output_fn``.
693
692
``transform_fn`` has the following signature:
694
693
695
694
.. code:: python
@@ -704,6 +703,8 @@ The return object should be one of the following:
704
703
- a tuple with two items: the response data and ``accept_type`` (the content type of the response data), or
705
704
- a Flask response object: http://flask.pocoo.org/docs/1.0/api/#response-objects
706
705
706
+
**Note:** We cannot use ``transform_fn`` implementation with ``input_fn``, ``predict_fn``, and/or ``output_fn``.
707
+
707
708
You can find examples of hosting scripts using this structure in the example notebooks, such as the `mxnet_gluon_sentiment <https://github.com/awslabs/amazon-sagemaker-examples/blob/master/sagemaker-python-sdk/mxnet_gluon_sentiment/sentiment.py#L344-L387>`__ notebook.
708
709
709
710
Working with existing model data and training jobs
0 commit comments