Mark the ExpandDimOp and the SqueezeOp as non expensive

Change: 128892723
This commit is contained in:
Benoit Steiner 2016-07-30 07:23:05 -08:00 committed by TensorFlower Gardener
parent ac281d1df4
commit 6fa593f46d

View File

@ -253,6 +253,8 @@ class ExpandDimsOp : public OpKernel {
" and output shape ", output_shape.DebugString())); " and output shape ", output_shape.DebugString()));
} }
} }
bool IsExpensive() override { return false; }
}; };
REGISTER_KERNEL_BUILDER(Name("ExpandDims").Device(DEVICE_CPU).HostMemory("dim"), REGISTER_KERNEL_BUILDER(Name("ExpandDims").Device(DEVICE_CPU).HostMemory("dim"),
ExpandDimsOp); ExpandDimsOp);
@ -342,6 +344,8 @@ class SqueezeOp : public OpKernel {
} }
} }
bool IsExpensive() override { return false; }
private: private:
std::unordered_set<int32> squeeze_dims_; std::unordered_set<int32> squeeze_dims_;
}; };