Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/mxnet/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __str__(self):

def get_config(self):
"""Save configurations of metric. Can be recreated
from configs with metric.create(**config)
from configs with metric.create(``**config``)
"""
config = self._kwargs.copy()
config.update({
Expand Down
15 changes: 8 additions & 7 deletions python/mxnet/module/sequential_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,35 @@ def __init__(self, logger=logging):
if x.startswith('META_')])

def add(self, module, **kwargs):
"""Adds a module to the chain.
"""Add a module to the chain.

Parameters
----------
module : BaseModule
The new module to add.
kwargs : **keywords
kwargs : ``**keywords``
All the keyword arguments are saved as meta information
for the added module. The currently known meta includes

- `take_labels`: indicating whether the module expect to
take labels when doing computation. Note any module in
the chain can take labels (not necessarily only the top
most one), and they all take the same labels passed
from the original data batch for the `SequentialModule`.
take labels when doing computation. Note any module in
the chain can take labels (not necessarily only the top
most one), and they all take the same labels passed
from the original data batch for the `SequentialModule`.


Returns
-------
self
This function returns `self` to allow us to easily chain a
series of `add` calls.

Examples
--------
>>> # An example of addinging two modules to a chain.
>>> seq_mod = mx.mod.SequentialModule()
>>> seq_mod.add(mod1)
>>> seq_mod.add(mod2)

"""
self._modules.append(module)

Expand Down