Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and add naive prelu support #23

Merged
merged 4 commits into from
Jan 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions binaries/dnn_infer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
using std::string; using std::cout; using std::endl;
using Clock = std::chrono::high_resolution_clock;

#define WARM_UP 5
#define RUNS 20
#define WARM_UP 0
#define RUNS 1

// ./dnn_save_result daqName outputBlob [input]
int main(int argc, char **argv) {
Expand Down
26 changes: 25 additions & 1 deletion common/daq.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace DNN;
enum DataType:byte { Float32 = 0, Int8 }
enum FuseCode:byte { None = 0, Relu, Relu1, Relu6 }
enum LayerType:byte { Conv2D = 0, AvePool, MaxPool, Relu, Softmax, FC, Add, Concat,
DepthwiseConv2D, BatchToSpace, SpaceToBatch, StridedSlice }
DepthwiseConv2D, BatchToSpace, SpaceToBatch, StridedSlice, Mul, AddScalar, MulScalar }

table Tensor {
data_type:DataType;
Expand Down Expand Up @@ -112,6 +112,27 @@ table Concat {
output:string;
}

table Mul {
input1:string;
input2:string;
fuse:FuseCode;
output:string;
}

table AddScalar {
input1:string;
input2:float;
fuse:FuseCode;
output:string;
}

table MulScalar {
input1:string;
input2:float;
fuse:FuseCode;
output:string;
}

table Layer {
type:LayerType;
conv2d_param:Conv2D;
Expand All @@ -126,6 +147,9 @@ table Layer {
batch_to_space_param:BatchToSpace;
space_to_batch_param:SpaceToBatch;
strided_slice_param:StridedSlice;
mul_param:Mul;
add_scalar_param:AddScalar;
mul_scalar_param:MulScalar;
}

table Model {
Expand Down