-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
dynet api survey #3562
Conversation
doc/design/python/dynet_survey.md
Outdated
}; | ||
``` | ||
|
||
graph至此构建完毕,dynet的反向过程并没有显示的拿出来 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dynet不需要构建backward,因为他每一个Op里面有forward
和backward
两个函数。
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个和我们目前的Scope有什么区别么?
There was a problem hiding this comment.
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)
No description provided.