Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Add namespace advice to backbones section of the template task (#348)
Browse files Browse the repository at this point in the history
* add namespace guideline

* update

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
aniketmaurya and mergify[bot] authored Jun 1, 2021
1 parent c11498d commit 2da2328
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/template/backbones.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2da2328

Please sign in to comment.