test_static_graph.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:static-define-by-run 作者: bkvogel 项目源码 文件源码
def __init__(self, n_units, n_out):
        super(MLP, self).__init__(
            # the size of the inputs to each layer will be inferred
            l1=L.Linear(None, n_units),  # n_in -> n_units
            l2=L.Linear(None, n_units),  # n_units -> n_units
            l3=L.Linear(None, n_out),  # n_units -> n_out
        )

    # To use the static graph feature, just add the `@static_graph' decorator to the
    # `__call__()` method of a Chain.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号