我正在关注 http://mxnet.io/how_to/new_op.html 中的文档了解如何通过子类化 mx.operator.CustomOp
类在 Python 中的 MXNet 中定义新的神经网络层。该示例是没有学习参数的损失层。那么学习到的参数如何进入forward
和backward
方法呢?
最佳答案
我明白了这一点。学习参数的配置与操作的任何其他输入一样。它们在 list_arguments
方法中配置。来自 docs page on writing custom symbols :
Note that list arguments declares both input and parameter and we recommend ordering them as
['input1', 'input2', ... , 'weight1', 'weight2', ...]
关于neural-network - 如何使用学习参数编写自定义 MXNet 层,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40571097/