Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynet api survey #3562

Closed
wants to merge 2 commits into from
Closed

Conversation

QiJune
Copy link
Member

@QiJune QiJune commented Aug 18, 2017

No description provided.

};
```

graph至此构建完毕,dynet的反向过程并没有显示的拿出来
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dynet不需要构建backward,因为他每一个Op里面有forwardbackward两个函数。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确实是的,跟paddle原来的做法一样


### 启发

1. 需要有一个全局的Model管理所有的parameter,Model提供一个create_parameter的接口用于创建parameter
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个和我们目前的Scope有什么区别么?

Copy link
Member Author

@QiJune QiJune Aug 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Model里面有Scope,像这样

class Model(object):
    def __init__(self):
        self.params = []
        self.param_to_grad = {}
        self.net = core.Net.create()
        self.scope = core.Scope()
     def create_parameter(self, name):
        var = self.scope.new_var(name)
        self.params.append(var)

@luotao1
Copy link
Contributor

luotao1 commented Feb 1, 2019

感谢您给PaddlePaddle贡献文档。由于文档已迁移至FluidDoc repo,因此关闭您的PR,欢迎您向FluidDoc Repo贡献文档。
Thanks for contributing to PaddlePaddle! Since documents have been moved to FluidDoc repo, we close this PR. Welcome to contribute to FluidDoc repo.

@luotao1 luotao1 closed this Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants