parent
0c2790f7e5
commit
efc119b43b
@ -1,5 +1,4 @@
|
||||
#include "paddle/operators/add_op.h"
|
||||
#include "paddle/framework/op_registry.h"
|
||||
#include "paddle/operators/add_op.h"
|
||||
|
||||
REGISTER_OP_GPU_KERNEL(add_two,
|
||||
paddle::operators::AddKernel<paddle::platform::GPUPlace, float>);
|
||||
REGISTER_OP_GPU_KERNEL(add_two, ops::AddKernel<ops::GPUPlace, float>);
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include "paddle/operators/cross_entropy_op.h"
|
||||
#include "paddle/framework/op_registry.h"
|
||||
|
||||
REGISTER_OP_GPU_KERNEL(onehot_cross_entropy,
|
||||
paddle::operators::OnehotCrossEntropyOpKernel<
|
||||
::paddle::platform::GPUPlace, float>);
|
||||
ops::OnehotCrossEntropyOpKernel<ops::GPUPlace, float>);
|
@ -1,6 +1,4 @@
|
||||
#include "paddle/framework/op_registry.h"
|
||||
#include "paddle/operators/rowwise_add_op.h"
|
||||
|
||||
REGISTER_OP_GPU_KERNEL(
|
||||
rowwise_add,
|
||||
paddle::operators::RowWiseAddKernel<paddle::platform ::GPUPlace, float>);
|
||||
REGISTER_OP_GPU_KERNEL(rowwise_add,
|
||||
ops::RowWiseAddKernel<ops::GPUPlace, float>);
|
||||
|
@ -1,5 +1,3 @@
|
||||
#include "paddle/operators/sgd_op.h"
|
||||
#include "paddle/framework/op_registry.h"
|
||||
|
||||
typedef paddle::operators::SGDOpKernel<::paddle::platform::GPUPlace, float> SGDOpKernel_GPU_float;
|
||||
REGISTER_OP_GPU_KERNEL(sgd, SGDOpKernel_GPU_float);
|
||||
REGISTER_OP_GPU_KERNEL(sgd, ops::SGDOpKernel<ops::GPUPlace, float>);
|
@ -1,5 +1,3 @@
|
||||
#include "paddle/operators/sigmoid_op.h"
|
||||
#include "paddle/framework/op_registry.h"
|
||||
|
||||
REGISTER_OP_GPU_KERNEL(
|
||||
sigmoid, paddle::operators::SigmoidKernel<paddle::platform::GPUPlace, float>);
|
||||
REGISTER_OP_GPU_KERNEL(sigmoid, ops::SigmoidKernel<ops::GPUPlace, float>);
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "paddle/framework/op_registry.h"
|
||||
#include "paddle/operators/softmax_op.h"
|
||||
|
||||
REGISTER_OP_GPU_KERNEL(
|
||||
softmax, paddle::operators::SoftmaxKernel<paddle::platform::GPUPlace, float>);
|
||||
REGISTER_OP_GPU_KERNEL(softmax, ops::SoftmaxKernel<ops::GPUPlace, float>);
|
||||
|
@ -0,0 +1,51 @@
|
||||
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
|
||||
|
||||
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. */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "paddle/framework/eigen.h"
|
||||
#include "paddle/framework/net.h"
|
||||
#include "paddle/framework/op_registry.h"
|
||||
|
||||
namespace paddle {
|
||||
namespace operators {
|
||||
|
||||
using OpKernel = framework::OpKernel;
|
||||
using KernelContext = framework::KernelContext;
|
||||
template <typename T,
|
||||
int MajorType = Eigen::RowMajor,
|
||||
typename IndexType = Eigen::DenseIndex>
|
||||
using EigenVector = framework::EigenVector<T, MajorType, IndexType>;
|
||||
template <typename T,
|
||||
int MajorType = Eigen::RowMajor,
|
||||
typename IndexType = Eigen::DenseIndex>
|
||||
using EigenMatrix = framework::EigenMatrix<T, MajorType, IndexType>;
|
||||
template <typename T,
|
||||
size_t D,
|
||||
int MajorType = Eigen::RowMajor,
|
||||
typename IndexType = Eigen::DenseIndex>
|
||||
using EigenTensor = framework::EigenTensor<T, D, MajorType, IndexType>;
|
||||
using Tensor = framework::Tensor;
|
||||
using OperatorWithKernel = framework::OperatorWithKernel;
|
||||
using OpProtoAndCheckerMaker = framework::OpProtoAndCheckerMaker;
|
||||
using OpProto = framework::OpProto;
|
||||
using OpAttrChecker = framework::OpAttrChecker;
|
||||
using CPUPlace = platform::CPUPlace;
|
||||
using GPUPlace = platform::GPUPlace;
|
||||
using PlainNet = framework::PlainNet;
|
||||
using OpRegistry = framework::OpRegistry;
|
||||
} // namespace operators
|
||||
} // namespace paddle
|
||||
|
||||
namespace ops = paddle::operators;
|
Loading…
Reference in new issue