Skip to content
Snippets Groups Projects
Commit 08f41ece authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Adjusted and added alexnet2 canny

parent 026c6cb0
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,9 @@ target_link_libraries(alexnet_cifar10 tensor_runtime ${GPU_PROFILER_LIB} ${SOC_
#add_executable(alexnet_cifar10_approx dnn_sources/src/alexnet_cifar10_approx.cc)
#target_link_libraries(alexnet_cifar10_approx tensor_runtime ${GPU_PROFILER_LIB} ${SOC_SIMULATOR_LIB})
add_executable(alexnet2_canny dnn_sources/src/alexnet2_canny.cc)
target_link_libraries(alexnet2_canny tensor_runtime ${GPU_PROFILER_LIB} ${SOC_SIMULATOR_LIB})
add_executable(alexnet2_cifar10 dnn_sources/src/alexnet2_cifar10.cc)
target_link_libraries(alexnet2_cifar10 tensor_runtime ${GPU_PROFILER_LIB} ${SOC_SIMULATOR_LIB})
......
......@@ -119,6 +119,7 @@ int main(){
std::string dir_prefix = std::string("../model_params/alexnet2_cifar10/");
std::string input_path = dir_prefix + std::string("norm_cifar_input.bin");
std::string canny_input_path = dir_prefix + std::string("canny_input.bin");
std::string labels_path = dir_prefix + std::string("test_labels.bin");
void* conv1_filter = readTrainedWeights("../model_params/alexnet2_cifar10/conv1.bin",
......@@ -171,6 +172,7 @@ int main(){
void* input = readInputBatch(input_path.c_str(), 0,start,end,3,32,32);
void* canny_input = readInputBatch(canny_input_path.c_str(), 0,start,end, 3, 128, 128);
void* conv1out = tensorConvolution(input, conv1_filter, 1, 1, 1, 1,
conv_mode, conv_precision);
......@@ -232,9 +234,8 @@ int main(){
void* argmax_out = tensorArgMax(result);
void* select_out = tensorSelect2(argmax_out, index_vector);
void* reduced_input = tensorContract(input, select_out);
void* reduced_input = tensorContract(canny_input, select_out);
invoke_canny(reduced_input);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment