{"action":"created","comment":{"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/comments/181931459","pull_request_review_id":112642291,"id":181931459,"diff_hunk":"@@ -0,0 +1,27 @@\n+package org.deeplearning4j.nn.workspace;\n+\n+/**\n+ * Array type enumeration for use with {@link LayerWorkspaceMgr}<br>\n+ * <br>\n+ * Array types:<br>\n+ * INPUT: The array set to the input field of a layer (i.e., input activations)<br>\n+ * ACTIVATIONS: The output activations for a layer's feed-forward method<br>\n+ * ACTIVATION_GRAD\n+ * FF_WORKING_MEM","path":"deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/workspace/ArrayType.java","position":null,"original_position":10,"commit_id":"38c4808c23ee9a782f335204133dada01e270ac1","original_commit_id":"62432afd4e97683d7875ec844f146945067eddc1","user":{"login":"AlexDBlack","id":2360237,"avatar_url":"https://avatars0.githubusercontent.com/u/2360237?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexDBlack","html_url":"https://github.com/AlexDBlack","followers_url":"https://api.github.com/users/AlexDBlack/followers","following_url":"https://api.github.com/users/AlexDBlack/following{/other_user}","gists_url":"https://api.github.com/users/AlexDBlack/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexDBlack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexDBlack/subscriptions","organizations_url":"https://api.github.com/users/AlexDBlack/orgs","repos_url":"https://api.github.com/users/AlexDBlack/repos","events_url":"https://api.github.com/users/AlexDBlack/events{/privacy}","received_events_url":"https://api.github.com/users/AlexDBlack/received_events","type":"User","site_admin":false},"body":"Fixed, good catch. I intended to fill out the rest :)","created_at":"2018-04-17T01:39:15Z","updated_at":"2018-04-17T01:39:15Z","html_url":"https://github.com/deeplearning4j/deeplearning4j/pull/4900#discussion_r181931459","pull_request_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/4900","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/comments/181931459"},"html":{"href":"https://github.com/deeplearning4j/deeplearning4j/pull/4900#discussion_r181931459"},"pull_request":{"href":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/4900"}},"in_reply_to_id":181741449},"pull_request":{"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/4900","id":180073960,"html_url":"https://github.com/deeplearning4j/deeplearning4j/pull/4900","diff_url":"https://github.com/deeplearning4j/deeplearning4j/pull/4900.diff","patch_url":"https://github.com/deeplearning4j/deeplearning4j/pull/4900.patch","issue_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/4900","number":4900,"state":"open","locked":false,"title":"Workspace optimizations and refactoring","user":{"login":"AlexDBlack","id":2360237,"avatar_url":"https://avatars0.githubusercontent.com/u/2360237?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexDBlack","html_url":"https://github.com/AlexDBlack","followers_url":"https://api.github.com/users/AlexDBlack/followers","following_url":"https://api.github.com/users/AlexDBlack/following{/other_user}","gists_url":"https://api.github.com/users/AlexDBlack/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexDBlack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexDBlack/subscriptions","organizations_url":"https://api.github.com/users/AlexDBlack/orgs","repos_url":"https://api.github.com/users/AlexDBlack/repos","events_url":"https://api.github.com/users/AlexDBlack/events{/privacy}","received_events_url":"https://api.github.com/users/AlexDBlack/received_events","type":"User","site_admin":false},"body":"***COMPLETE BUT REQUIRES ADDITIONAL QA BEFORE MERGING***\r\nAll deeplearning4j-core tests are passing (CPU) but additional testing is required.\r\n\r\nND4J PR to go with this: https://github.com/deeplearning4j/nd4j/pull/2823\r\n\r\n\r\nThis PR overhauls workspaces in DL4J, to improve performance and memory use.\r\nIt also adds a lot of workspace validation, to detect invalid workspace use (bugs, bad layer implementations etc).\r\n\r\nGoals here:\r\n1. Eliminate performance bottleneck of migrateInputs() etc: all arrays are allocated in the final workspace they should be in\r\n2. Reduce memory requirements\r\n3. Improve maintainability and considerably simplify workspace usage:\r\n    a. Workspace-related code had become unweildy in MultiLayerNetwork and ComputationGraph FF/BP methods, and has been simplified (and made more maintainable)\r\n    b. A lot of additional workspace-related validation has been added - this should make it considerably easier to detect workspace-related bugs in the future (due to bugs in layers, etc)\r\n\r\nIn terms of  design:\r\n1. Workspaces-related code should be handled at the level of array types (input, activations, etc) not workspace names (\"loop_ff\" etc). Layers etc don't need to know/care about the workspace configuration - simply that input arrays should use the INPUT enumeration, activation arrays should use the ACTIVATION enumeration, etc.\r\n2. Layers, preprocessors, etc will know about workspaces. This means API changes\r\n3. I've also slightly simplified the layer API by cleaning up a number of superfluous methods (unnecessary activate/output methods)\r\n4. We're looking at substantial rewrite of the MLN and CG feedforward and backprop methods:\r\n    a. They are built with workspaces in mind from scratch.\r\n    b. Reduced code redundancy (we had essentially the same FF loops in a number of places, with minor variants)","created_at":"2018-04-06T23:20:45Z","updated_at":"2018-04-17T01:39:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73871b666da727220d67d57931061bcab7fda77b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"raver119","id":12250879,"avatar_url":"https://avatars2.githubusercontent.com/u/12250879?v=4","gravatar_id":"","url":"https://api.github.com/users/raver119","html_url":"https://github.com/raver119","followers_url":"https://api.github.com/users/raver119/followers","following_url":"https://api.github.com/users/raver119/following{/other_user}","gists_url":"https://api.github.com/users/raver119/gists{/gist_id}","starred_url":"https://api.github.com/users/raver119/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raver119/subscriptions","organizations_url":"https://api.github.com/users/raver119/orgs","repos_url":"https://api.github.com/users/raver119/repos","events_url":"https://api.github.com/users/raver119/events{/privacy}","received_events_url":"https://api.github.com/users/raver119/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/4900/commits","review_comments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/4900/comments","review_comment_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/comments{/number}","comments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/4900/comments","statuses_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/statuses/38c4808c23ee9a782f335204133dada01e270ac1","head":{"label":"deeplearning4j:ab_workspace_opt","ref":"ab_workspace_opt","sha":"38c4808c23ee9a782f335204133dada01e270ac1","user":{"login":"deeplearning4j","id":10988606,"avatar_url":"https://avatars2.githubusercontent.com/u/10988606?v=4","gravatar_id":"","url":"https://api.github.com/users/deeplearning4j","html_url":"https://github.com/deeplearning4j","followers_url":"https://api.github.com/users/deeplearning4j/followers","following_url":"https://api.github.com/users/deeplearning4j/following{/other_user}","gists_url":"https://api.github.com/users/deeplearning4j/gists{/gist_id}","starred_url":"https://api.github.com/users/deeplearning4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deeplearning4j/subscriptions","organizations_url":"https://api.github.com/users/deeplearning4j/orgs","repos_url":"https://api.github.com/users/deeplearning4j/repos","events_url":"https://api.github.com/users/deeplearning4j/events{/privacy}","received_events_url":"https://api.github.com/users/deeplearning4j/received_events","type":"Organization","site_admin":false},"repo":{"id":14734876,"name":"deeplearning4j","full_name":"deeplearning4j/deeplearning4j","owner":{"login":"deeplearning4j","id":10988606,"avatar_url":"https://avatars2.githubusercontent.com/u/10988606?v=4","gravatar_id":"","url":"https://api.github.com/users/deeplearning4j","html_url":"https://github.com/deeplearning4j","followers_url":"https://api.github.com/users/deeplearning4j/followers","following_url":"https://api.github.com/users/deeplearning4j/following{/other_user}","gists_url":"https://api.github.com/users/deeplearning4j/gists{/gist_id}","starred_url":"https://api.github.com/users/deeplearning4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deeplearning4j/subscriptions","organizations_url":"https://api.github.com/users/deeplearning4j/orgs","repos_url":"https://api.github.com/users/deeplearning4j/repos","events_url":"https://api.github.com/users/deeplearning4j/events{/privacy}","received_events_url":"https://api.github.com/users/deeplearning4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/deeplearning4j/deeplearning4j","description":"Deep Learning for Java, Scala & Clojure on Hadoop & Spark With GPUs - From Skymind","fork":false,"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j","forks_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/forks","keys_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/teams","hooks_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/hooks","issue_events_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/events{/number}","events_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/events","assignees_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/assignees{/user}","branches_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/branches{/branch}","tags_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/tags","blobs_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/statuses/{sha}","languages_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/languages","stargazers_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/stargazers","contributors_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/contributors","subscribers_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/subscribers","subscription_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/subscription","commits_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/contents/{+path}","compare_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/merges","archive_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/downloads","issues_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues{/number}","pulls_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls{/number}","milestones_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/milestones{/number}","notifications_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/labels{/name}","releases_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/releases{/id}","deployments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/deployments","created_at":"2013-11-27T02:03:28Z","updated_at":"2018-04-17T00:10:01Z","pushed_at":"2018-04-17T01:31:22Z","git_url":"git://github.com/deeplearning4j/deeplearning4j.git","ssh_url":"git@github.com:deeplearning4j/deeplearning4j.git","clone_url":"https://github.com/deeplearning4j/deeplearning4j.git","svn_url":"https://github.com/deeplearning4j/deeplearning4j","homepage":"http://deeplearning4j.org","size":192888,"stargazers_count":8718,"watchers_count":8718,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4179,"mirror_url":null,"archived":false,"open_issues_count":652,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":4179,"open_issues":652,"watchers":8718,"default_branch":"master"}},"base":{"label":"deeplearning4j:master","ref":"master","sha":"a6bfba9210dcf592ed5cf67863bc83d02da56b27","user":{"login":"deeplearning4j","id":10988606,"avatar_url":"https://avatars2.githubusercontent.com/u/10988606?v=4","gravatar_id":"","url":"https://api.github.com/users/deeplearning4j","html_url":"https://github.com/deeplearning4j","followers_url":"https://api.github.com/users/deeplearning4j/followers","following_url":"https://api.github.com/users/deeplearning4j/following{/other_user}","gists_url":"https://api.github.com/users/deeplearning4j/gists{/gist_id}","starred_url":"https://api.github.com/users/deeplearning4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deeplearning4j/subscriptions","organizations_url":"https://api.github.com/users/deeplearning4j/orgs","repos_url":"https://api.github.com/users/deeplearning4j/repos","events_url":"https://api.github.com/users/deeplearning4j/events{/privacy}","received_events_url":"https://api.github.com/users/deeplearning4j/received_events","type":"Organization","site_admin":false},"repo":{"id":14734876,"name":"deeplearning4j","full_name":"deeplearning4j/deeplearning4j","owner":{"login":"deeplearning4j","id":10988606,"avatar_url":"https://avatars2.githubusercontent.com/u/10988606?v=4","gravatar_id":"","url":"https://api.github.com/users/deeplearning4j","html_url":"https://github.com/deeplearning4j","followers_url":"https://api.github.com/users/deeplearning4j/followers","following_url":"https://api.github.com/users/deeplearning4j/following{/other_user}","gists_url":"https://api.github.com/users/deeplearning4j/gists{/gist_id}","starred_url":"https://api.github.com/users/deeplearning4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deeplearning4j/subscriptions","organizations_url":"https://api.github.com/users/deeplearning4j/orgs","repos_url":"https://api.github.com/users/deeplearning4j/repos","events_url":"https://api.github.com/users/deeplearning4j/events{/privacy}","received_events_url":"https://api.github.com/users/deeplearning4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/deeplearning4j/deeplearning4j","description":"Deep Learning for Java, Scala & Clojure on Hadoop & Spark With GPUs - From Skymind","fork":false,"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j","forks_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/forks","keys_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/teams","hooks_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/hooks","issue_events_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/events{/number}","events_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/events","assignees_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/assignees{/user}","branches_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/branches{/branch}","tags_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/tags","blobs_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/statuses/{sha}","languages_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/languages","stargazers_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/stargazers","contributors_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/contributors","subscribers_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/subscribers","subscription_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/subscription","commits_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/contents/{+path}","compare_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/merges","archive_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/downloads","issues_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues{/number}","pulls_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls{/number}","milestones_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/milestones{/number}","notifications_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/labels{/name}","releases_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/releases{/id}","deployments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/deployments","created_at":"2013-11-27T02:03:28Z","updated_at":"2018-04-17T00:10:01Z","pushed_at":"2018-04-17T01:31:22Z","git_url":"git://github.com/deeplearning4j/deeplearning4j.git","ssh_url":"git@github.com:deeplearning4j/deeplearning4j.git","clone_url":"https://github.com/deeplearning4j/deeplearning4j.git","svn_url":"https://github.com/deeplearning4j/deeplearning4j","homepage":"http://deeplearning4j.org","size":192888,"stargazers_count":8718,"watchers_count":8718,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4179,"mirror_url":null,"archived":false,"open_issues_count":652,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":4179,"open_issues":652,"watchers":8718,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/4900"},"html":{"href":"https://github.com/deeplearning4j/deeplearning4j/pull/4900"},"issue":{"href":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/4900"},"comments":{"href":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/4900/comments"},"review_comments":{"href":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/4900/comments"},"review_comment":{"href":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/deeplearning4j/deeplearning4j/pulls/4900/commits"},"statuses":{"href":"https://api.github.com/repos/deeplearning4j/deeplearning4j/statuses/38c4808c23ee9a782f335204133dada01e270ac1"}},"author_association":"OWNER"}}
{"actor":{"display_login":"AlexDBlack"}}