用法:
add(module, **kwargs)
- module:(mxnet.module.BaseModule) - 要添加的新模塊。
- kwargs:(
**keywords
) -所有關鍵字參數都保存為添加模塊的元信息。目前已知的元包括take_labels
: 指示模塊是否期望計算時取標簽。請注意,鏈中的任何模塊都可以采用標簽(不一定隻有最上麵的一個),並且它們都采用從
SequentialModule
的原始數據批次傳遞的相同標簽。
此函數返回
self
以允許我們輕鬆鏈接一係列add
調用。self
參數:
返回:
返回類型:
將模塊添加到鏈中。
例子:
>>> # An example of addinging two modules to a chain. >>> seq_mod = mx.mod.SequentialModule() >>> seq_mod.add(mod1) >>> seq_mod.add(mod2)
相關用法
- Python mxnet.module.BaseModule.get_outputs用法及代碼示例
- Python mxnet.module.BaseModule.forward用法及代碼示例
- Python mxnet.module.BaseModule.bind用法及代碼示例
- Python mxnet.module.BaseModule.init_params用法及代碼示例
- Python mxnet.module.BaseModule.get_params用法及代碼示例
- Python mxnet.module.BaseModule.set_params用法及代碼示例
- Python mxnet.module.BaseModule.update用法及代碼示例
- Python mxnet.module.BaseModule.iter_predict用法及代碼示例
- Python mxnet.module.BaseModule.save_params用法及代碼示例
- Python mxnet.module.BucketingModule.set_params用法及代碼示例
- Python mxnet.module.BaseModule.init_optimizer用法及代碼示例
- Python mxnet.module.BaseModule.score用法及代碼示例
- Python mxnet.module.BaseModule.fit用法及代碼示例
- Python mxnet.module.BaseModule.update_metric用法及代碼示例
- Python mxnet.module.Module.set_params用法及代碼示例
- Python mxnet.module.BaseModule.predict用法及代碼示例
- Python mxnet.module.BaseModule.get_input_grads用法及代碼示例
- Python mxnet.module.BaseModule.backward用法及代碼示例
- Python mxnet.module.BaseModule.load_params用法及代碼示例
- Python mxnet.module.BaseModule用法及代碼示例
注:本文由純淨天空篩選整理自apache.org大神的英文原創作品 mxnet.module.SequentialModule.add。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。