ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Module.cpp File Reference
#include "nnkit/support/caffe/Backend.h"
#include <nnkit/CmdlineArguments.h>
#include <memory>

Go to the source code of this file.

Functions

std::unique_ptr< nnkit::Backendmake_backend (const nnkit::CmdlineArguments &args)
 

Function Documentation

◆ make_backend()

std::unique_ptr< nnkit::Backend > make_backend ( const nnkit::CmdlineArguments args)

Definition at line 23 of file Module.cpp.

24{
25 using std::make_unique;
26
27 auto net = make_unique<::caffe::Net<float>>(args.at(0), caffe::TEST);
28
29 if (args.size() > 1)
30 {
31 net->CopyTrainedLayersFrom(args.at(1));
32 }
33
34 return make_unique<::nnkit::support::caffe::Backend<float>>(std::move(net));
35}
args
Definition infer.py:21