diff --git a/paddle/framework/net.h b/paddle/framework/net.h index d3e3e80d5bb0df035490c3f89c79c73999e28681..3264f1f565e3efc188e7835cb9b44e5741e1eea8 100644 --- a/paddle/framework/net.h +++ b/paddle/framework/net.h @@ -71,7 +71,7 @@ class PlainNet : public Net { * will be used. */ void Run(const std::shared_ptr& scope, - platform::DeviceContext& dev_ctx) const override { + const platform::DeviceContext& dev_ctx) const override { for (auto& op : ops_) { op->Run(scope, dev_ctx); }