zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r150330094
 
 

 ##########
 File path: src/operator/nn/fully_connected-inl.h
 ##########
 @@ -176,124 +162,80 @@ class FullyConnectedOp : public Operator {
     linalg_gemm(grad, wmat, gdata, false, false, s, req[fullc::kData]);
   }
 
+  static FullyConnectedOp &get_op(const FullyConnectedParam& param) {
+    static thread_local FullyConnectedOp op;
+    op.Init(param);
+    return op;
+  }
+
 
 Review comment:
   I agree that we can make activation completely stateless.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to