From 2da2328bc98e3a415eff2f18f6f8d8f7155840a4 Mon Sep 17 00:00:00 2001 From: Aniket Maurya Date: Tue, 1 Jun 2021 16:25:31 +0530 Subject: [PATCH] Add namespace advice to backbones section of the template task (#348) * add namespace guideline * update Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- docs/source/template/backbones.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/template/backbones.rst b/docs/source/template/backbones.rst index a15523bc3f..002b128697 100644 --- a/docs/source/template/backbones.rst +++ b/docs/source/template/backbones.rst @@ -20,6 +20,8 @@ You can create a registry like this: Let's add a simple MLP backbone to our registry. We need a function that creates the backbone and returns it along with the output size (so that we can create the model head in our :class:`~flash.core.model.Task`). You can use any name for the function, although we use ``load_{model name}`` by convention. +You also need to provide ``name`` and ``namespace`` of the backbone. +The standard for *namespace* is ``data_type/task_type``, so for an image classification task the namespace will be ``image/classification``. Here's the code: .. literalinclude:: ../../../flash/template/classification/backbones.py