{"action":"created","comment":{"url":"https://api.github.com/repos/dmlc/mxnet/pulls/comments/44440904","id":44440904,"diff_hunk":"@@ -0,0 +1,264 @@\n+/*!\n+ * Copyright (c) 2015 by Contributors\n+ * \\file elementwise_binary_op-inl.h\n+ * \\brief Elementwise binary operation, plus, minus, mul, div\n+*/\n+#ifndef MXNET_OPERATOR_ELEMENTWISE_BINARY_SCALAR_OP_INL_H_\n+#define MXNET_OPERATOR_ELEMENTWISE_BINARY_SCALAR_OP_INL_H_\n+\n+#include <dmlc/logging.h>\n+#include <mxnet/operator.h>\n+#include <mshadow/tensor.h>\n+#include <utility>\n+#include <string>\n+#include <vector>\n+#include <map>\n+#include \"./operator_common.h\"\n+#include \"./mshadow_op.h\"\n+\n+namespace mxnet {\n+namespace op {\n+\n+namespace elembinary {\n+enum ElementwiseBinaryScalarOpInputs {kLhs};\n+enum ElementwiseBinaryScalarOpOutputs {kOut};\n+enum ElementwiseBinaryScalarOpType {kPlus, kMinus, kMul, kDiv};\n+}  // elembinary\n+\n+struct ScalarOpParam : public dmlc::Parameter<ScalarOpParam> {\n+    // use int for enumeration\n+    float value;\n+    bool right;\n+    DMLC_DECLARE_PARAMETER(ScalarOpParam) {\n+        DMLC_DECLARE_FIELD(value)\n+            .set_default(0)\n+            .describe(\"Activation function to be applied.\");\n+        DMLC_DECLARE_FIELD(right)\n+            .set_default(false)\n+            .describe(\"right\");","path":"src/operator/elementwise_binary_scalar_op-inl.h","position":38,"original_position":38,"commit_id":"86129f73f56ad8cde361d006b995f9afb8f568e3","original_commit_id":"86129f73f56ad8cde361d006b995f9afb8f568e3","user":{"login":"tqchen","id":2577440,"avatar_url":"https://avatars.githubusercontent.com/u/2577440?v=3","gravatar_id":"","url":"https://api.github.com/users/tqchen","html_url":"https://github.com/tqchen","followers_url":"https://api.github.com/users/tqchen/followers","following_url":"https://api.github.com/users/tqchen/following{/other_user}","gists_url":"https://api.github.com/users/tqchen/gists{/gist_id}","starred_url":"https://api.github.com/users/tqchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqchen/subscriptions","organizations_url":"https://api.github.com/users/tqchen/orgs","repos_url":"https://api.github.com/users/tqchen/repos","events_url":"https://api.github.com/users/tqchen/events{/privacy}","received_events_url":"https://api.github.com/users/tqchen/received_events","type":"User","site_admin":false},"body":"scalar operand is on the right","created_at":"2015-11-10T18:01:44Z","updated_at":"2015-11-10T18:01:44Z","html_url":"https://github.com/dmlc/mxnet/pull/514#discussion_r44440904","pull_request_url":"https://api.github.com/repos/dmlc/mxnet/pulls/514","_links":{"self":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/comments/44440904"},"html":{"href":"https://github.com/dmlc/mxnet/pull/514#discussion_r44440904"},"pull_request":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/514"}}},"pull_request":{"url":"https://api.github.com/repos/dmlc/mxnet/pulls/514","id":50061736,"html_url":"https://github.com/dmlc/mxnet/pull/514","diff_url":"https://github.com/dmlc/mxnet/pull/514.diff","patch_url":"https://github.com/dmlc/mxnet/pull/514.patch","issue_url":"https://api.github.com/repos/dmlc/mxnet/issues/514","number":514,"state":"open","locked":false,"title":"Add Scalar Symbol","user":{"login":"yajiedesign","id":771744,"avatar_url":"https://avatars.githubusercontent.com/u/771744?v=3","gravatar_id":"","url":"https://api.github.com/users/yajiedesign","html_url":"https://github.com/yajiedesign","followers_url":"https://api.github.com/users/yajiedesign/followers","following_url":"https://api.github.com/users/yajiedesign/following{/other_user}","gists_url":"https://api.github.com/users/yajiedesign/gists{/gist_id}","starred_url":"https://api.github.com/users/yajiedesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yajiedesign/subscriptions","organizations_url":"https://api.github.com/users/yajiedesign/orgs","repos_url":"https://api.github.com/users/yajiedesign/repos","events_url":"https://api.github.com/users/yajiedesign/events{/privacy}","received_events_url":"https://api.github.com/users/yajiedesign/received_events","type":"User","site_admin":false},"body":"Add Scalar Symbol\r\nhttps://github.com/dmlc/mxnet/issues/473","created_at":"2015-11-08T14:46:55Z","updated_at":"2015-11-10T18:01:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d24809e5cb68d4c7473b41f2e9ac479c217614e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dmlc/mxnet/pulls/514/commits","review_comments_url":"https://api.github.com/repos/dmlc/mxnet/pulls/514/comments","review_comment_url":"https://api.github.com/repos/dmlc/mxnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/514/comments","statuses_url":"https://api.github.com/repos/dmlc/mxnet/statuses/86129f73f56ad8cde361d006b995f9afb8f568e3","head":{"label":"yajiedesign:scalar_symbol","ref":"scalar_symbol","sha":"86129f73f56ad8cde361d006b995f9afb8f568e3","user":{"login":"yajiedesign","id":771744,"avatar_url":"https://avatars.githubusercontent.com/u/771744?v=3","gravatar_id":"","url":"https://api.github.com/users/yajiedesign","html_url":"https://github.com/yajiedesign","followers_url":"https://api.github.com/users/yajiedesign/followers","following_url":"https://api.github.com/users/yajiedesign/following{/other_user}","gists_url":"https://api.github.com/users/yajiedesign/gists{/gist_id}","starred_url":"https://api.github.com/users/yajiedesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yajiedesign/subscriptions","organizations_url":"https://api.github.com/users/yajiedesign/orgs","repos_url":"https://api.github.com/users/yajiedesign/repos","events_url":"https://api.github.com/users/yajiedesign/events{/privacy}","received_events_url":"https://api.github.com/users/yajiedesign/received_events","type":"User","site_admin":false},"repo":{"id":43763550,"name":"mxnet","full_name":"yajiedesign/mxnet","owner":{"login":"yajiedesign","id":771744,"avatar_url":"https://avatars.githubusercontent.com/u/771744?v=3","gravatar_id":"","url":"https://api.github.com/users/yajiedesign","html_url":"https://github.com/yajiedesign","followers_url":"https://api.github.com/users/yajiedesign/followers","following_url":"https://api.github.com/users/yajiedesign/following{/other_user}","gists_url":"https://api.github.com/users/yajiedesign/gists{/gist_id}","starred_url":"https://api.github.com/users/yajiedesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yajiedesign/subscriptions","organizations_url":"https://api.github.com/users/yajiedesign/orgs","repos_url":"https://api.github.com/users/yajiedesign/repos","events_url":"https://api.github.com/users/yajiedesign/events{/privacy}","received_events_url":"https://api.github.com/users/yajiedesign/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yajiedesign/mxnet","description":"efficient, flexible, distributed deep learning framework ","fork":true,"url":"https://api.github.com/repos/yajiedesign/mxnet","forks_url":"https://api.github.com/repos/yajiedesign/mxnet/forks","keys_url":"https://api.github.com/repos/yajiedesign/mxnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yajiedesign/mxnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yajiedesign/mxnet/teams","hooks_url":"https://api.github.com/repos/yajiedesign/mxnet/hooks","issue_events_url":"https://api.github.com/repos/yajiedesign/mxnet/issues/events{/number}","events_url":"https://api.github.com/repos/yajiedesign/mxnet/events","assignees_url":"https://api.github.com/repos/yajiedesign/mxnet/assignees{/user}","branches_url":"https://api.github.com/repos/yajiedesign/mxnet/branches{/branch}","tags_url":"https://api.github.com/repos/yajiedesign/mxnet/tags","blobs_url":"https://api.github.com/repos/yajiedesign/mxnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yajiedesign/mxnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yajiedesign/mxnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/yajiedesign/mxnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yajiedesign/mxnet/statuses/{sha}","languages_url":"https://api.github.com/repos/yajiedesign/mxnet/languages","stargazers_url":"https://api.github.com/repos/yajiedesign/mxnet/stargazers","contributors_url":"https://api.github.com/repos/yajiedesign/mxnet/contributors","subscribers_url":"https://api.github.com/repos/yajiedesign/mxnet/subscribers","subscription_url":"https://api.github.com/repos/yajiedesign/mxnet/subscription","commits_url":"https://api.github.com/repos/yajiedesign/mxnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/yajiedesign/mxnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/yajiedesign/mxnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/yajiedesign/mxnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/yajiedesign/mxnet/contents/{+path}","compare_url":"https://api.github.com/repos/yajiedesign/mxnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yajiedesign/mxnet/merges","archive_url":"https://api.github.com/repos/yajiedesign/mxnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yajiedesign/mxnet/downloads","issues_url":"https://api.github.com/repos/yajiedesign/mxnet/issues{/number}","pulls_url":"https://api.github.com/repos/yajiedesign/mxnet/pulls{/number}","milestones_url":"https://api.github.com/repos/yajiedesign/mxnet/milestones{/number}","notifications_url":"https://api.github.com/repos/yajiedesign/mxnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yajiedesign/mxnet/labels{/name}","releases_url":"https://api.github.com/repos/yajiedesign/mxnet/releases{/id}","created_at":"2015-10-06T16:36:40Z","updated_at":"2015-10-06T16:36:42Z","pushed_at":"2015-11-10T06:31:54Z","git_url":"git://github.com/yajiedesign/mxnet.git","ssh_url":"git@github.com:yajiedesign/mxnet.git","clone_url":"https://github.com/yajiedesign/mxnet.git","svn_url":"https://github.com/yajiedesign/mxnet","homepage":"","size":3192,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"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":"dmlc:master","ref":"master","sha":"9d1abbfe2bb227e988e82bcbbe53fcf0e61a10a5","user":{"login":"dmlc","id":11508361,"avatar_url":"https://avatars.githubusercontent.com/u/11508361?v=3","gravatar_id":"","url":"https://api.github.com/users/dmlc","html_url":"https://github.com/dmlc","followers_url":"https://api.github.com/users/dmlc/followers","following_url":"https://api.github.com/users/dmlc/following{/other_user}","gists_url":"https://api.github.com/users/dmlc/gists{/gist_id}","starred_url":"https://api.github.com/users/dmlc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmlc/subscriptions","organizations_url":"https://api.github.com/users/dmlc/orgs","repos_url":"https://api.github.com/users/dmlc/repos","events_url":"https://api.github.com/users/dmlc/events{/privacy}","received_events_url":"https://api.github.com/users/dmlc/received_events","type":"Organization","site_admin":false},"repo":{"id":34864402,"name":"mxnet","full_name":"dmlc/mxnet","owner":{"login":"dmlc","id":11508361,"avatar_url":"https://avatars.githubusercontent.com/u/11508361?v=3","gravatar_id":"","url":"https://api.github.com/users/dmlc","html_url":"https://github.com/dmlc","followers_url":"https://api.github.com/users/dmlc/followers","following_url":"https://api.github.com/users/dmlc/following{/other_user}","gists_url":"https://api.github.com/users/dmlc/gists{/gist_id}","starred_url":"https://api.github.com/users/dmlc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmlc/subscriptions","organizations_url":"https://api.github.com/users/dmlc/orgs","repos_url":"https://api.github.com/users/dmlc/repos","events_url":"https://api.github.com/users/dmlc/events{/privacy}","received_events_url":"https://api.github.com/users/dmlc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dmlc/mxnet","description":"Lightweight, Portable, Fast and Flexible Distributed Deep Learning, for python, R, Julia, Go and more","fork":false,"url":"https://api.github.com/repos/dmlc/mxnet","forks_url":"https://api.github.com/repos/dmlc/mxnet/forks","keys_url":"https://api.github.com/repos/dmlc/mxnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmlc/mxnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmlc/mxnet/teams","hooks_url":"https://api.github.com/repos/dmlc/mxnet/hooks","issue_events_url":"https://api.github.com/repos/dmlc/mxnet/issues/events{/number}","events_url":"https://api.github.com/repos/dmlc/mxnet/events","assignees_url":"https://api.github.com/repos/dmlc/mxnet/assignees{/user}","branches_url":"https://api.github.com/repos/dmlc/mxnet/branches{/branch}","tags_url":"https://api.github.com/repos/dmlc/mxnet/tags","blobs_url":"https://api.github.com/repos/dmlc/mxnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmlc/mxnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmlc/mxnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmlc/mxnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmlc/mxnet/statuses/{sha}","languages_url":"https://api.github.com/repos/dmlc/mxnet/languages","stargazers_url":"https://api.github.com/repos/dmlc/mxnet/stargazers","contributors_url":"https://api.github.com/repos/dmlc/mxnet/contributors","subscribers_url":"https://api.github.com/repos/dmlc/mxnet/subscribers","subscription_url":"https://api.github.com/repos/dmlc/mxnet/subscription","commits_url":"https://api.github.com/repos/dmlc/mxnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmlc/mxnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmlc/mxnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmlc/mxnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmlc/mxnet/contents/{+path}","compare_url":"https://api.github.com/repos/dmlc/mxnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmlc/mxnet/merges","archive_url":"https://api.github.com/repos/dmlc/mxnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmlc/mxnet/downloads","issues_url":"https://api.github.com/repos/dmlc/mxnet/issues{/number}","pulls_url":"https://api.github.com/repos/dmlc/mxnet/pulls{/number}","milestones_url":"https://api.github.com/repos/dmlc/mxnet/milestones{/number}","notifications_url":"https://api.github.com/repos/dmlc/mxnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmlc/mxnet/labels{/name}","releases_url":"https://api.github.com/repos/dmlc/mxnet/releases{/id}","created_at":"2015-04-30T16:21:15Z","updated_at":"2015-11-10T17:58:21Z","pushed_at":"2015-11-10T17:08:15Z","git_url":"git://github.com/dmlc/mxnet.git","ssh_url":"git@github.com:dmlc/mxnet.git","clone_url":"https://github.com/dmlc/mxnet.git","svn_url":"https://github.com/dmlc/mxnet","homepage":"http://mxnet.rtfd.org","size":6532,"stargazers_count":928,"watchers_count":928,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":275,"mirror_url":null,"open_issues_count":59,"forks":275,"open_issues":59,"watchers":928,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/514"},"html":{"href":"https://github.com/dmlc/mxnet/pull/514"},"issue":{"href":"https://api.github.com/repos/dmlc/mxnet/issues/514"},"comments":{"href":"https://api.github.com/repos/dmlc/mxnet/issues/514/comments"},"review_comments":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/514/comments"},"review_comment":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/514/commits"},"statuses":{"href":"https://api.github.com/repos/dmlc/mxnet/statuses/86129f73f56ad8cde361d006b995f9afb8f568e3"}}}}