blob: 20a5c9c42ffde17d9eca89a1782d4d61306a1e7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef TENSORFLOW_KERNELS_CONSTANT_OP_H_
#define TENSORFLOW_KERNELS_CONSTANT_OP_H_
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/tensor_types.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
namespace tensorflow {
// ConstantOp returns a tensor specified by ConstantOpDef.
class ConstantOp : public OpKernel {
public:
explicit ConstantOp(OpKernelConstruction* ctx);
void Compute(OpKernelContext* ctx) override;
bool IsExpensive() override { return false; }
~ConstantOp() override;
private:
Tensor tensor_;
TF_DISALLOW_COPY_AND_ASSIGN(ConstantOp);
};
} // namespace tensorflow
#endif // TENSORFLOW_KERNELS_CONSTANT_OP_H_
|