提交 d0863815 编写于 作者: W wangliu

modify code style

上级 91ac601a
...@@ -29,11 +29,11 @@ namespace paddle_mobile { ...@@ -29,11 +29,11 @@ namespace paddle_mobile {
template <typename Dtype = CPU, Precision P = Precision::FP32> template <typename Dtype = CPU, Precision P = Precision::FP32>
class Loader { class Loader {
public: public:
const framework::Program<Dtype, P> Load(const std::string &dirname, const framework::Program<Dtype, P> Load(const std::string &dirname,
bool optimize = false); bool optimize = false);
private: private:
void LoadVar(framework::Variable *variable, void LoadVar(framework::Variable *variable,
const framework::VarDesc &var_desc, const framework::VarDesc &var_desc,
const std::string &file_path); const std::string &file_path);
...@@ -41,7 +41,7 @@ private: ...@@ -41,7 +41,7 @@ private:
template <typename Dtype = CPU, Precision P = Precision::FP32> template <typename Dtype = CPU, Precision P = Precision::FP32>
class Executor { class Executor {
public: public:
typedef typename PrecisionTrait<P>::ptype Ptype; typedef typename PrecisionTrait<P>::ptype Ptype;
Executor(const framework::Program<Dtype> p, int batch_size = 1, Executor(const framework::Program<Dtype> p, int batch_size = 1,
...@@ -52,7 +52,7 @@ public: ...@@ -52,7 +52,7 @@ public:
std::vector<Ptype> Predict(const std::vector<Ptype> &input, std::vector<Ptype> Predict(const std::vector<Ptype> &input,
const std::vector<int64_t> &dims); const std::vector<int64_t> &dims);
protected: protected:
Executor() = default; Executor() = default;
void InitMemory(); void InitMemory();
...@@ -64,9 +64,9 @@ protected: ...@@ -64,9 +64,9 @@ protected:
std::shared_ptr<framework::Tensor> Predict(const framework::Tensor &t, std::shared_ptr<framework::Tensor> Predict(const framework::Tensor &t,
int block_id); int block_id);
std::map<framework::BlockDesc, std::map<framework::BlockDesc,
std::vector<std::shared_ptr<framework::OperatorBase<Dtype>>>> std::vector<std::shared_ptr<framework::OperatorBase<Dtype>>>>
ops_of_block_; ops_of_block_;
bool use_optimize_ = false; bool use_optimize_ = false;
}; };
} // namespace paddle_mobile } // namespace paddle_mobile
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册