summaryrefslogtreecommitdiff
path: root/caffe2/operators/mean_op.cu
diff options
context:
space:
mode:
authorMohammad Hossain <zem@fb.com>2018-03-02 16:18:17 -0800
committerbddppq <bai@in.tum.de>2018-03-02 16:18:17 -0800
commit349238f5bf7e9a19400c88c229de4f3101777e34 (patch)
tree0c8320b72d601edd88f1e1fe0a4562734345cbb1 /caffe2/operators/mean_op.cu
parent558e2a92df05c2e32459bbcbef6b0d46cf84cded (diff)
downloadpytorch-349238f5bf7e9a19400c88c229de4f3101777e34.tar.gz
pytorch-349238f5bf7e9a19400c88c229de4f3101777e34.tar.bz2
pytorch-349238f5bf7e9a19400c88c229de4f3101777e34.zip
Mean Op (#2072)
* Mean Op * Mean Op * Mean Op * Fix gradients and include seed for randomized input generation * Update test strategies parameters
Diffstat (limited to 'caffe2/operators/mean_op.cu')
-rw-r--r--caffe2/operators/mean_op.cu24
1 files changed, 24 insertions, 0 deletions
diff --git a/caffe2/operators/mean_op.cu b/caffe2/operators/mean_op.cu
new file mode 100644
index 0000000000..84e4e76457
--- /dev/null
+++ b/caffe2/operators/mean_op.cu
@@ -0,0 +1,24 @@
+ /* Copyright (c) 2016-present, Facebook, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "caffe2/core/context_gpu.h"
+#include "caffe2/operators/mean_op.h"
+
+namespace caffe2 {
+
+REGISTER_CUDA_OPERATOR(Mean, MeanOp<CUDAContext>);
+REGISTER_CUDA_OPERATOR(MeanGradient, MeanGradientOp<CUDAContext>);
+
+} // namespace caffe2