{"action":"created","comment":{"url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/comments/111415531","pull_request_review_id":32660626,"id":111415531,"diff_hunk":"@@ -236,6 +263,18 @@ abstract class AbstractModule[A <: Activity: ClassTag, B <: Activity: ClassTag,\n   def parameters(): (Array[Tensor[T]], Array[Tensor[T]]) = null\n \n   /**\n+   * This function returns the array of trainable parameters.\n+   * @return trainable parameters\n+   */\n+  def trainableParameters(): (Array[Tensor[T]], Array[Tensor[T]]) = {","path":"spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/abstractnn/AbstractModule.scala","position":72,"original_position":72,"commit_id":"95ad6e81af4b4ef3b1587cfd129c92ce1439c706","original_commit_id":"95ad6e81af4b4ef3b1587cfd129c92ce1439c706","user":{"login":"yiheng","id":1297418,"avatar_url":"https://avatars0.githubusercontent.com/u/1297418?v=3","gravatar_id":"","url":"https://api.github.com/users/yiheng","html_url":"https://github.com/yiheng","followers_url":"https://api.github.com/users/yiheng/followers","following_url":"https://api.github.com/users/yiheng/following{/other_user}","gists_url":"https://api.github.com/users/yiheng/gists{/gist_id}","starred_url":"https://api.github.com/users/yiheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiheng/subscriptions","organizations_url":"https://api.github.com/users/yiheng/orgs","repos_url":"https://api.github.com/users/yiheng/repos","events_url":"https://api.github.com/users/yiheng/events{/privacy}","received_events_url":"https://api.github.com/users/yiheng/received_events","type":"User","site_admin":false},"body":"why not add an optional flag to the parameter API?","created_at":"2017-04-13T15:20:20Z","updated_at":"2017-04-13T15:20:20Z","html_url":"https://github.com/intel-analytics/BigDL/pull/746#discussion_r111415531","pull_request_url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/746","_links":{"self":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/comments/111415531"},"html":{"href":"https://github.com/intel-analytics/BigDL/pull/746#discussion_r111415531"},"pull_request":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/746"}}},"pull_request":{"url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/746","id":114506748,"html_url":"https://github.com/intel-analytics/BigDL/pull/746","diff_url":"https://github.com/intel-analytics/BigDL/pull/746.diff","patch_url":"https://github.com/intel-analytics/BigDL/pull/746.patch","issue_url":"https://api.github.com/repos/intel-analytics/BigDL/issues/746","number":746,"state":"open","locked":false,"title":"[Issue 450] add trainable to module in order to support \"freeze layers\" in finetune","user":{"login":"SeaOfOcean","id":10606312,"avatar_url":"https://avatars0.githubusercontent.com/u/10606312?v=3","gravatar_id":"","url":"https://api.github.com/users/SeaOfOcean","html_url":"https://github.com/SeaOfOcean","followers_url":"https://api.github.com/users/SeaOfOcean/followers","following_url":"https://api.github.com/users/SeaOfOcean/following{/other_user}","gists_url":"https://api.github.com/users/SeaOfOcean/gists{/gist_id}","starred_url":"https://api.github.com/users/SeaOfOcean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeaOfOcean/subscriptions","organizations_url":"https://api.github.com/users/SeaOfOcean/orgs","repos_url":"https://api.github.com/users/SeaOfOcean/repos","events_url":"https://api.github.com/users/SeaOfOcean/events{/privacy}","received_events_url":"https://api.github.com/users/SeaOfOcean/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\nadd a trainable parameter to AbstractModule, default = true\r\n\r\nWhen doing backward, if the module is not trainable, accGradParameters is ignored\r\n\r\nWhen updating the parameters in optim, getParameters(filterTrainable=true) (filterTrainable is false by default) is called, and only trainable parameters are collected and updated.\r\n\r\n## How was this patch tested?\r\n\r\nunit test\r\n\r\n## Related links or issues (optional)\r\nfixed https://github.com/intel-analytics/BigDL/issues/450\r\n\r\n","created_at":"2017-04-06T01:41:26Z","updated_at":"2017-04-13T15:20:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1581e236cae876143f2393d4ab43528d85438b53","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/746/commits","review_comments_url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/746/comments","review_comment_url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/intel-analytics/BigDL/issues/746/comments","statuses_url":"https://api.github.com/repos/intel-analytics/BigDL/statuses/95ad6e81af4b4ef3b1587cfd129c92ce1439c706","head":{"label":"SeaOfOcean:freeze","ref":"freeze","sha":"95ad6e81af4b4ef3b1587cfd129c92ce1439c706","user":{"login":"SeaOfOcean","id":10606312,"avatar_url":"https://avatars0.githubusercontent.com/u/10606312?v=3","gravatar_id":"","url":"https://api.github.com/users/SeaOfOcean","html_url":"https://github.com/SeaOfOcean","followers_url":"https://api.github.com/users/SeaOfOcean/followers","following_url":"https://api.github.com/users/SeaOfOcean/following{/other_user}","gists_url":"https://api.github.com/users/SeaOfOcean/gists{/gist_id}","starred_url":"https://api.github.com/users/SeaOfOcean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeaOfOcean/subscriptions","organizations_url":"https://api.github.com/users/SeaOfOcean/orgs","repos_url":"https://api.github.com/users/SeaOfOcean/repos","events_url":"https://api.github.com/users/SeaOfOcean/events{/privacy}","received_events_url":"https://api.github.com/users/SeaOfOcean/received_events","type":"User","site_admin":false},"repo":{"id":77887710,"name":"BigDL","full_name":"SeaOfOcean/BigDL","owner":{"login":"SeaOfOcean","id":10606312,"avatar_url":"https://avatars0.githubusercontent.com/u/10606312?v=3","gravatar_id":"","url":"https://api.github.com/users/SeaOfOcean","html_url":"https://github.com/SeaOfOcean","followers_url":"https://api.github.com/users/SeaOfOcean/followers","following_url":"https://api.github.com/users/SeaOfOcean/following{/other_user}","gists_url":"https://api.github.com/users/SeaOfOcean/gists{/gist_id}","starred_url":"https://api.github.com/users/SeaOfOcean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeaOfOcean/subscriptions","organizations_url":"https://api.github.com/users/SeaOfOcean/orgs","repos_url":"https://api.github.com/users/SeaOfOcean/repos","events_url":"https://api.github.com/users/SeaOfOcean/events{/privacy}","received_events_url":"https://api.github.com/users/SeaOfOcean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SeaOfOcean/BigDL","description":"BigDL: Distributed Deep learning Library for Apache Spark","fork":true,"url":"https://api.github.com/repos/SeaOfOcean/BigDL","forks_url":"https://api.github.com/repos/SeaOfOcean/BigDL/forks","keys_url":"https://api.github.com/repos/SeaOfOcean/BigDL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SeaOfOcean/BigDL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SeaOfOcean/BigDL/teams","hooks_url":"https://api.github.com/repos/SeaOfOcean/BigDL/hooks","issue_events_url":"https://api.github.com/repos/SeaOfOcean/BigDL/issues/events{/number}","events_url":"https://api.github.com/repos/SeaOfOcean/BigDL/events","assignees_url":"https://api.github.com/repos/SeaOfOcean/BigDL/assignees{/user}","branches_url":"https://api.github.com/repos/SeaOfOcean/BigDL/branches{/branch}","tags_url":"https://api.github.com/repos/SeaOfOcean/BigDL/tags","blobs_url":"https://api.github.com/repos/SeaOfOcean/BigDL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SeaOfOcean/BigDL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SeaOfOcean/BigDL/git/refs{/sha}","trees_url":"https://api.github.com/repos/SeaOfOcean/BigDL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SeaOfOcean/BigDL/statuses/{sha}","languages_url":"https://api.github.com/repos/SeaOfOcean/BigDL/languages","stargazers_url":"https://api.github.com/repos/SeaOfOcean/BigDL/stargazers","contributors_url":"https://api.github.com/repos/SeaOfOcean/BigDL/contributors","subscribers_url":"https://api.github.com/repos/SeaOfOcean/BigDL/subscribers","subscription_url":"https://api.github.com/repos/SeaOfOcean/BigDL/subscription","commits_url":"https://api.github.com/repos/SeaOfOcean/BigDL/commits{/sha}","git_commits_url":"https://api.github.com/repos/SeaOfOcean/BigDL/git/commits{/sha}","comments_url":"https://api.github.com/repos/SeaOfOcean/BigDL/comments{/number}","issue_comment_url":"https://api.github.com/repos/SeaOfOcean/BigDL/issues/comments{/number}","contents_url":"https://api.github.com/repos/SeaOfOcean/BigDL/contents/{+path}","compare_url":"https://api.github.com/repos/SeaOfOcean/BigDL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SeaOfOcean/BigDL/merges","archive_url":"https://api.github.com/repos/SeaOfOcean/BigDL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SeaOfOcean/BigDL/downloads","issues_url":"https://api.github.com/repos/SeaOfOcean/BigDL/issues{/number}","pulls_url":"https://api.github.com/repos/SeaOfOcean/BigDL/pulls{/number}","milestones_url":"https://api.github.com/repos/SeaOfOcean/BigDL/milestones{/number}","notifications_url":"https://api.github.com/repos/SeaOfOcean/BigDL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SeaOfOcean/BigDL/labels{/name}","releases_url":"https://api.github.com/repos/SeaOfOcean/BigDL/releases{/id}","deployments_url":"https://api.github.com/repos/SeaOfOcean/BigDL/deployments","created_at":"2017-01-03T05:47:50Z","updated_at":"2017-01-03T05:47:55Z","pushed_at":"2017-04-13T06:57:06Z","git_url":"git://github.com/SeaOfOcean/BigDL.git","ssh_url":"git@github.com:SeaOfOcean/BigDL.git","clone_url":"https://github.com/SeaOfOcean/BigDL.git","svn_url":"https://github.com/SeaOfOcean/BigDL","homepage":"","size":13560,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"intel-analytics:master","ref":"master","sha":"38be954f7eebc3ab3f36215e3abcd4d689fee25d","user":{"login":"intel-analytics","id":10941215,"avatar_url":"https://avatars0.githubusercontent.com/u/10941215?v=3","gravatar_id":"","url":"https://api.github.com/users/intel-analytics","html_url":"https://github.com/intel-analytics","followers_url":"https://api.github.com/users/intel-analytics/followers","following_url":"https://api.github.com/users/intel-analytics/following{/other_user}","gists_url":"https://api.github.com/users/intel-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-analytics/subscriptions","organizations_url":"https://api.github.com/users/intel-analytics/orgs","repos_url":"https://api.github.com/users/intel-analytics/repos","events_url":"https://api.github.com/users/intel-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/intel-analytics/received_events","type":"Organization","site_admin":false},"repo":{"id":66823715,"name":"BigDL","full_name":"intel-analytics/BigDL","owner":{"login":"intel-analytics","id":10941215,"avatar_url":"https://avatars0.githubusercontent.com/u/10941215?v=3","gravatar_id":"","url":"https://api.github.com/users/intel-analytics","html_url":"https://github.com/intel-analytics","followers_url":"https://api.github.com/users/intel-analytics/followers","following_url":"https://api.github.com/users/intel-analytics/following{/other_user}","gists_url":"https://api.github.com/users/intel-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-analytics/subscriptions","organizations_url":"https://api.github.com/users/intel-analytics/orgs","repos_url":"https://api.github.com/users/intel-analytics/repos","events_url":"https://api.github.com/users/intel-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/intel-analytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/intel-analytics/BigDL","description":"BigDL: Distributed Deep Learning Library for Apache Spark","fork":false,"url":"https://api.github.com/repos/intel-analytics/BigDL","forks_url":"https://api.github.com/repos/intel-analytics/BigDL/forks","keys_url":"https://api.github.com/repos/intel-analytics/BigDL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intel-analytics/BigDL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intel-analytics/BigDL/teams","hooks_url":"https://api.github.com/repos/intel-analytics/BigDL/hooks","issue_events_url":"https://api.github.com/repos/intel-analytics/BigDL/issues/events{/number}","events_url":"https://api.github.com/repos/intel-analytics/BigDL/events","assignees_url":"https://api.github.com/repos/intel-analytics/BigDL/assignees{/user}","branches_url":"https://api.github.com/repos/intel-analytics/BigDL/branches{/branch}","tags_url":"https://api.github.com/repos/intel-analytics/BigDL/tags","blobs_url":"https://api.github.com/repos/intel-analytics/BigDL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intel-analytics/BigDL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intel-analytics/BigDL/git/refs{/sha}","trees_url":"https://api.github.com/repos/intel-analytics/BigDL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intel-analytics/BigDL/statuses/{sha}","languages_url":"https://api.github.com/repos/intel-analytics/BigDL/languages","stargazers_url":"https://api.github.com/repos/intel-analytics/BigDL/stargazers","contributors_url":"https://api.github.com/repos/intel-analytics/BigDL/contributors","subscribers_url":"https://api.github.com/repos/intel-analytics/BigDL/subscribers","subscription_url":"https://api.github.com/repos/intel-analytics/BigDL/subscription","commits_url":"https://api.github.com/repos/intel-analytics/BigDL/commits{/sha}","git_commits_url":"https://api.github.com/repos/intel-analytics/BigDL/git/commits{/sha}","comments_url":"https://api.github.com/repos/intel-analytics/BigDL/comments{/number}","issue_comment_url":"https://api.github.com/repos/intel-analytics/BigDL/issues/comments{/number}","contents_url":"https://api.github.com/repos/intel-analytics/BigDL/contents/{+path}","compare_url":"https://api.github.com/repos/intel-analytics/BigDL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intel-analytics/BigDL/merges","archive_url":"https://api.github.com/repos/intel-analytics/BigDL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intel-analytics/BigDL/downloads","issues_url":"https://api.github.com/repos/intel-analytics/BigDL/issues{/number}","pulls_url":"https://api.github.com/repos/intel-analytics/BigDL/pulls{/number}","milestones_url":"https://api.github.com/repos/intel-analytics/BigDL/milestones{/number}","notifications_url":"https://api.github.com/repos/intel-analytics/BigDL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intel-analytics/BigDL/labels{/name}","releases_url":"https://api.github.com/repos/intel-analytics/BigDL/releases{/id}","deployments_url":"https://api.github.com/repos/intel-analytics/BigDL/deployments","created_at":"2016-08-29T07:59:50Z","updated_at":"2017-04-13T12:42:20Z","pushed_at":"2017-04-13T13:23:51Z","git_url":"git://github.com/intel-analytics/BigDL.git","ssh_url":"git@github.com:intel-analytics/BigDL.git","clone_url":"https://github.com/intel-analytics/BigDL.git","svn_url":"https://github.com/intel-analytics/BigDL","homepage":"","size":11163,"stargazers_count":1644,"watchers_count":1644,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":296,"mirror_url":null,"open_issues_count":101,"forks":296,"open_issues":101,"watchers":1644,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/746"},"html":{"href":"https://github.com/intel-analytics/BigDL/pull/746"},"issue":{"href":"https://api.github.com/repos/intel-analytics/BigDL/issues/746"},"comments":{"href":"https://api.github.com/repos/intel-analytics/BigDL/issues/746/comments"},"review_comments":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/746/comments"},"review_comment":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/746/commits"},"statuses":{"href":"https://api.github.com/repos/intel-analytics/BigDL/statuses/95ad6e81af4b4ef3b1587cfd129c92ce1439c706"}}}}
{"actor":{"display_login":"yiheng"}}