提交 8caf5dd5 编写于 作者: L liuruilong

format files

上级 1d155a33
......@@ -270,8 +270,8 @@ void ProgramOptimize::GenerateOps(
}
void ProgramOptimize::GenerateOps(
std::vector<std::shared_ptr<framework::OpDesc>> *op_descs,
Node *begin_node, bool can_add_split) {
std::vector<std::shared_ptr<framework::OpDesc>> *op_descs, Node *begin_node,
bool can_add_split) {
// std::vector<std::shared_ptr<framework::OpDesc>> *op_desc,
// Node *input_node, Node *current_node, bool adding_thread, int
// thread_num
......
......@@ -75,7 +75,8 @@ static size_t ReadBuffer(const char *file_name, uint8_t **out) {
template <typename Dtype, Precision P>
const framework::Program<Dtype, P> Loader<Dtype, P>::Load(
const std::string &dirname, bool optimize, bool can_add_split) {
auto program = this->LoadProgram(dirname + "/__model__", optimize, can_add_split);
auto program =
this->LoadProgram(dirname + "/__model__", optimize, can_add_split);
program.model_path = dirname;
return program;
}
......
......@@ -35,7 +35,8 @@ class Loader {
* @b 加载分开形式的 fluid 模型
* */
const framework::Program<Dtype, P> Load(const std::string &dirname,
bool optimize = false, bool can_add_split = false);
bool optimize = false,
bool can_add_split = false);
/*
* @b load combine format fluid mode
......@@ -47,7 +48,8 @@ class Loader {
private:
const framework::Program<Dtype, P> LoadProgram(const std::string &model_path,
bool optimize = false, bool can_add_split = false);
bool optimize = false,
bool can_add_split = false);
};
template <typename Dtype = CPU, Precision P = Precision::FP32>
......
......@@ -12,15 +12,16 @@ 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. */
#include "io/io.h"
#include "../test_helper.h"
#include "io/io.h"
int main() {
paddle_mobile::Loader<paddle_mobile::CPU> loader;
// ../../../test/models/googlenet
// ../../../test/models/mobilenet
auto program = loader.Load(g_googlenet, true, true);
// loader.Load(g_googlenet_combine + "/model", g_googlenet_combine + "/params",
// loader.Load(g_googlenet_combine + "/model", g_googlenet_combine +
// "/params",
// true);
program.originProgram->Description("program desc: ");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册