├── .gitignore ├── MoltenVK ├── iOS │ └── framework │ │ └── MoltenVK.framework │ │ ├── Headers │ │ ├── mvk_datatypes.h │ │ ├── mvk_vulkan.h │ │ └── vk_mvk_moltenvk.h │ │ └── MoltenVK └── include │ ├── MoltenVK │ ├── mvk_datatypes.h │ ├── mvk_vulkan.h │ └── vk_mvk_moltenvk.h │ ├── vulkan-portability │ └── vk_extx_portability_subset.h │ └── vulkan │ ├── vk_icd.h │ ├── vk_layer.h │ ├── vk_platform.h │ ├── vk_sdk_platform.h │ ├── vulkan.h │ ├── vulkan.hpp │ ├── vulkan_android.h │ ├── vulkan_core.h │ ├── vulkan_fuchsia.h │ ├── vulkan_ios.h │ ├── vulkan_macos.h │ ├── vulkan_mir.h │ ├── vulkan_vi.h │ ├── vulkan_wayland.h │ ├── vulkan_win32.h │ ├── vulkan_xcb.h │ ├── vulkan_xlib.h │ └── vulkan_xlib_xrandr.h ├── NcnnFrmDemo_MoltenVK ├── NcnnFrmDemo_MoltenVK.xcodeproj │ └── project.pbxproj ├── NcnnFrmDemo_MoltenVK │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.mm │ └── main.m └── ncnn.framework │ ├── Headers │ ├── Resources │ ├── Versions │ ├── A │ │ ├── Headers │ │ │ ├── allocator.h │ │ │ ├── benchmark.h │ │ │ ├── blob.h │ │ │ ├── command.h │ │ │ ├── cpu.h │ │ │ ├── gpu.h │ │ │ ├── layer.h │ │ │ ├── layer_type.h │ │ │ ├── layer_type_enum.h │ │ │ ├── mat.h │ │ │ ├── modelbin.h │ │ │ ├── net.h │ │ │ ├── opencv.h │ │ │ ├── paramdict.h │ │ │ ├── pipeline.h │ │ │ └── platform.h │ │ ├── Resources │ │ │ └── Info.plist │ │ └── ncnn │ └── Current │ └── ncnn ├── NcnnSrcDemo ├── NcnnSrcDemo.xcodeproj │ └── project.pbxproj ├── NcnnSrcDemo │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.mm │ └── main.m └── src │ ├── CMakeLists.txt │ ├── allocator.cpp │ ├── allocator.h │ ├── benchmark.cpp │ ├── benchmark.h │ ├── blob.cpp │ ├── blob.h │ ├── command.cpp │ ├── command.h │ ├── cpu.cpp │ ├── cpu.h │ ├── gpu.cpp │ ├── gpu.h │ ├── layer.cpp │ ├── layer.h │ ├── layer │ ├── absval.cpp │ ├── absval.h │ ├── argmax.cpp │ ├── argmax.h │ ├── arm │ │ ├── absval_arm.cpp │ │ ├── absval_arm.h │ │ ├── batchnorm_arm.cpp │ │ ├── batchnorm_arm.h │ │ ├── bias_arm.cpp │ │ ├── bias_arm.h │ │ ├── clip_arm.cpp │ │ ├── clip_arm.h │ │ ├── convolution_1x1.h │ │ ├── convolution_1x1_int8.h │ │ ├── convolution_2x2.h │ │ ├── convolution_3x3.h │ │ ├── convolution_3x3_int8.h │ │ ├── convolution_4x4.h │ │ ├── convolution_5x5.h │ │ ├── convolution_7x7.h │ │ ├── convolution_arm.cpp │ │ ├── convolution_arm.h │ │ ├── convolutiondepthwise_3x3.h │ │ ├── convolutiondepthwise_3x3_int8.h │ │ ├── convolutiondepthwise_5x5.h │ │ ├── convolutiondepthwise_arm.cpp │ │ ├── convolutiondepthwise_arm.h │ │ ├── deconvolution_3x3.h │ │ ├── deconvolution_4x4.h │ │ ├── deconvolution_arm.cpp │ │ ├── deconvolution_arm.h │ │ ├── deconvolutiondepthwise_arm.cpp │ │ ├── deconvolutiondepthwise_arm.h │ │ ├── dequantize_arm.cpp │ │ ├── dequantize_arm.h │ │ ├── eltwise_arm.cpp │ │ ├── eltwise_arm.h │ │ ├── innerproduct_arm.cpp │ │ ├── innerproduct_arm.h │ │ ├── lrn_arm.cpp │ │ ├── lrn_arm.h │ │ ├── neon_mathfun.h │ │ ├── pooling_2x2.h │ │ ├── pooling_3x3.h │ │ ├── pooling_arm.cpp │ │ ├── pooling_arm.h │ │ ├── prelu_arm.cpp │ │ ├── prelu_arm.h │ │ ├── quantize_arm.cpp │ │ ├── quantize_arm.h │ │ ├── relu_arm.cpp │ │ ├── relu_arm.h │ │ ├── scale_arm.cpp │ │ ├── scale_arm.h │ │ ├── sigmoid_arm.cpp │ │ ├── sigmoid_arm.h │ │ ├── softmax_arm.cpp │ │ └── softmax_arm.h │ ├── batchnorm.cpp │ ├── batchnorm.h │ ├── bias.cpp │ ├── bias.h │ ├── binaryop.cpp │ ├── binaryop.h │ ├── bnll.cpp │ ├── bnll.h │ ├── clip.cpp │ ├── clip.h │ ├── concat.cpp │ ├── concat.h │ ├── convolution.cpp │ ├── convolution.h │ ├── convolutiondepthwise.cpp │ ├── convolutiondepthwise.h │ ├── crop.cpp │ ├── crop.h │ ├── deconvolution.cpp │ ├── deconvolution.h │ ├── deconvolutiondepthwise.cpp │ ├── deconvolutiondepthwise.h │ ├── dequantize.cpp │ ├── dequantize.h │ ├── detectionoutput.cpp │ ├── detectionoutput.h │ ├── dropout.cpp │ ├── dropout.h │ ├── eltwise.cpp │ ├── eltwise.h │ ├── elu.cpp │ ├── elu.h │ ├── embed.cpp │ ├── embed.h │ ├── exp.cpp │ ├── exp.h │ ├── expanddims.cpp │ ├── expanddims.h │ ├── flatten.cpp │ ├── flatten.h │ ├── innerproduct.cpp │ ├── innerproduct.h │ ├── input.cpp │ ├── input.h │ ├── instancenorm.cpp │ ├── instancenorm.h │ ├── interp.cpp │ ├── interp.h │ ├── log.cpp │ ├── log.h │ ├── lrn.cpp │ ├── lrn.h │ ├── lstm.cpp │ ├── lstm.h │ ├── matmul.cpp │ ├── matmul.h │ ├── memorydata.cpp │ ├── memorydata.h │ ├── mvn.cpp │ ├── mvn.h │ ├── normalize.cpp │ ├── normalize.h │ ├── packing.cpp │ ├── packing.h │ ├── padding.cpp │ ├── padding.h │ ├── permute.cpp │ ├── permute.h │ ├── pooling.cpp │ ├── pooling.h │ ├── power.cpp │ ├── power.h │ ├── prelu.cpp │ ├── prelu.h │ ├── priorbox.cpp │ ├── priorbox.h │ ├── proposal.cpp │ ├── proposal.h │ ├── psroipooling.cpp │ ├── psroipooling.h │ ├── quantize.cpp │ ├── quantize.h │ ├── reduction.cpp │ ├── reduction.h │ ├── relu.cpp │ ├── relu.h │ ├── reorg.cpp │ ├── reorg.h │ ├── reshape.cpp │ ├── reshape.h │ ├── rnn.cpp │ ├── rnn.h │ ├── roialign.cpp │ ├── roialign.h │ ├── roipooling.cpp │ ├── roipooling.h │ ├── scale.cpp │ ├── scale.h │ ├── shader │ │ ├── batchnorm.comp │ │ ├── batchnorm_pack4.comp │ │ ├── binaryop.comp │ │ ├── binaryop_pack4.comp │ │ ├── convolution.comp │ │ ├── convolution_1x1s1d1.comp │ │ ├── convolution_pack4.comp │ │ ├── convolutiondepthwise.comp │ │ ├── convolutiondepthwise_pack4.comp │ │ ├── dropout.comp │ │ ├── dropout_pack4.comp │ │ ├── eltwise.comp │ │ ├── eltwise_pack4.comp │ │ ├── innerproduct.comp │ │ ├── innerproduct_pack4.comp │ │ ├── padding.comp │ │ ├── padding_pack4.comp │ │ ├── pooling.comp │ │ ├── pooling_global.comp │ │ ├── pooling_global_pack4.comp │ │ ├── pooling_pack4.comp │ │ ├── relu.comp │ │ ├── relu_pack4.comp │ │ ├── scale.comp │ │ ├── scale_pack4.comp │ │ ├── softmax.comp │ │ ├── softmax_div_sum.comp │ │ ├── softmax_div_sum_pack4.comp │ │ ├── softmax_exp_sub_max.comp │ │ ├── softmax_exp_sub_max_pack4.comp │ │ ├── softmax_reduce_max.comp │ │ ├── softmax_reduce_max_pack4.comp │ │ ├── softmax_reduce_sum.comp │ │ ├── softmax_reduce_sum_pack4.comp │ │ ├── unaryop.comp │ │ └── unaryop_pack4.comp │ ├── shufflechannel.cpp │ ├── shufflechannel.h │ ├── sigmoid.cpp │ ├── sigmoid.h │ ├── slice.cpp │ ├── slice.h │ ├── softmax.cpp │ ├── softmax.h │ ├── split.cpp │ ├── split.h │ ├── spp.cpp │ ├── spp.h │ ├── squeeze.cpp │ ├── squeeze.h │ ├── tanh.cpp │ ├── tanh.h │ ├── threshold.cpp │ ├── threshold.h │ ├── tile.cpp │ ├── tile.h │ ├── unaryop.cpp │ ├── unaryop.h │ ├── x86 │ │ ├── avx_mathfun.h │ │ ├── convolution_1x1.h │ │ ├── convolution_1x1_int8.h │ │ ├── convolution_3x3.h │ │ ├── convolution_3x3_int8.h │ │ ├── convolution_5x5.h │ │ ├── convolution_x86.cpp │ │ ├── convolution_x86.h │ │ ├── convolutiondepthwise_3x3.h │ │ ├── convolutiondepthwise_3x3_int8.h │ │ ├── convolutiondepthwise_x86.cpp │ │ ├── convolutiondepthwise_x86.h │ │ └── sse_mathfun.h │ ├── yolodetectionoutput.cpp │ ├── yolodetectionoutput.h │ ├── yolov3detectionoutput.cpp │ └── yolov3detectionoutput.h │ ├── layer_declaration.h │ ├── layer_declaration.h.in │ ├── layer_registry.h │ ├── layer_registry.h.in │ ├── layer_shader_registry.h.in │ ├── layer_shader_spv_data.h.in │ ├── layer_type.h │ ├── layer_type_enum.h │ ├── layer_type_enum.h.in │ ├── mat.cpp │ ├── mat.h │ ├── mat_pixel.cpp │ ├── mat_pixel_resize.cpp │ ├── modelbin.cpp │ ├── modelbin.h │ ├── net.cpp │ ├── net.h │ ├── opencv.cpp │ ├── opencv.h │ ├── paramdict.cpp │ ├── paramdict.h │ ├── pipeline.cpp │ ├── pipeline.h │ ├── platform.h │ └── platform.h.in ├── NcnnSrcDemo_MoltenVK ├── NcnnSrcDemo_MoltenVK.xcodeproj │ └── project.pbxproj ├── NcnnSrcDemo_MoltenVK │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.mm │ └── main.m ├── build_headers │ ├── CMakeFiles │ │ ├── CMakeDirectoryInformation.cmake │ │ ├── generate-spirv.dir │ │ │ ├── DependInfo.cmake │ │ │ ├── build.make │ │ │ ├── cmake_clean.cmake │ │ │ ├── depend.internal │ │ │ ├── depend.make │ │ │ └── progress.make │ │ ├── ncnn.dir │ │ │ ├── CXX.includecache │ │ │ ├── DependInfo.cmake │ │ │ ├── allocator.cpp.o │ │ │ ├── benchmark.cpp.o │ │ │ ├── blob.cpp.o │ │ │ ├── build.make │ │ │ ├── cmake_clean.cmake │ │ │ ├── cmake_clean_target.cmake │ │ │ ├── command.cpp.o │ │ │ ├── cpu.cpp.o │ │ │ ├── depend.internal │ │ │ ├── depend.make │ │ │ ├── flags.make │ │ │ ├── gpu.cpp.o │ │ │ ├── layer.cpp.o │ │ │ ├── layer │ │ │ │ ├── absval.cpp.o │ │ │ │ ├── arm │ │ │ │ │ ├── absval_arm.cpp.o │ │ │ │ │ ├── batchnorm_arm.cpp.o │ │ │ │ │ ├── bias_arm.cpp.o │ │ │ │ │ ├── clip_arm.cpp.o │ │ │ │ │ ├── convolution_arm.cpp.o │ │ │ │ │ ├── convolutiondepthwise_arm.cpp.o │ │ │ │ │ ├── deconvolution_arm.cpp.o │ │ │ │ │ ├── deconvolutiondepthwise_arm.cpp.o │ │ │ │ │ ├── dequantize_arm.cpp.o │ │ │ │ │ ├── eltwise_arm.cpp.o │ │ │ │ │ ├── innerproduct_arm.cpp.o │ │ │ │ │ ├── interp_arm.cpp.o │ │ │ │ │ ├── lrn_arm.cpp.o │ │ │ │ │ ├── pooling_arm.cpp.o │ │ │ │ │ ├── prelu_arm.cpp.o │ │ │ │ │ ├── quantize_arm.cpp.o │ │ │ │ │ ├── relu_arm.cpp.o │ │ │ │ │ ├── requantize_arm.cpp.o │ │ │ │ │ ├── scale_arm.cpp.o │ │ │ │ │ ├── sigmoid_arm.cpp.o │ │ │ │ │ └── softmax_arm.cpp.o │ │ │ │ ├── batchnorm.cpp.o │ │ │ │ ├── bias.cpp.o │ │ │ │ ├── binaryop.cpp.o │ │ │ │ ├── bnll.cpp.o │ │ │ │ ├── cast.cpp.o │ │ │ │ ├── clip.cpp.o │ │ │ │ ├── concat.cpp.o │ │ │ │ ├── convolution.cpp.o │ │ │ │ ├── convolutiondepthwise.cpp.o │ │ │ │ ├── crop.cpp.o │ │ │ │ ├── deconvolution.cpp.o │ │ │ │ ├── deconvolutiondepthwise.cpp.o │ │ │ │ ├── dequantize.cpp.o │ │ │ │ ├── detectionoutput.cpp.o │ │ │ │ ├── dropout.cpp.o │ │ │ │ ├── eltwise.cpp.o │ │ │ │ ├── elu.cpp.o │ │ │ │ ├── embed.cpp.o │ │ │ │ ├── exp.cpp.o │ │ │ │ ├── expanddims.cpp.o │ │ │ │ ├── flatten.cpp.o │ │ │ │ ├── innerproduct.cpp.o │ │ │ │ ├── input.cpp.o │ │ │ │ ├── instancenorm.cpp.o │ │ │ │ ├── interp.cpp.o │ │ │ │ ├── log.cpp.o │ │ │ │ ├── lrn.cpp.o │ │ │ │ ├── matmul.cpp.o │ │ │ │ ├── memorydata.cpp.o │ │ │ │ ├── mvn.cpp.o │ │ │ │ ├── normalize.cpp.o │ │ │ │ ├── packing.cpp.o │ │ │ │ ├── padding.cpp.o │ │ │ │ ├── permute.cpp.o │ │ │ │ ├── pooling.cpp.o │ │ │ │ ├── power.cpp.o │ │ │ │ ├── prelu.cpp.o │ │ │ │ ├── priorbox.cpp.o │ │ │ │ ├── proposal.cpp.o │ │ │ │ ├── psroipooling.cpp.o │ │ │ │ ├── quantize.cpp.o │ │ │ │ ├── reduction.cpp.o │ │ │ │ ├── relu.cpp.o │ │ │ │ ├── reorg.cpp.o │ │ │ │ ├── requantize.cpp.o │ │ │ │ ├── reshape.cpp.o │ │ │ │ ├── roipooling.cpp.o │ │ │ │ ├── scale.cpp.o │ │ │ │ ├── shufflechannel.cpp.o │ │ │ │ ├── sigmoid.cpp.o │ │ │ │ ├── slice.cpp.o │ │ │ │ ├── softmax.cpp.o │ │ │ │ ├── split.cpp.o │ │ │ │ ├── squeeze.cpp.o │ │ │ │ ├── tanh.cpp.o │ │ │ │ ├── threshold.cpp.o │ │ │ │ ├── unaryop.cpp.o │ │ │ │ ├── yolodetectionoutput.cpp.o │ │ │ │ └── yolov3detectionoutput.cpp.o │ │ │ ├── link.txt │ │ │ ├── mat.cpp.o │ │ │ ├── mat_pixel.cpp.o │ │ │ ├── mat_pixel_resize.cpp.o │ │ │ ├── modelbin.cpp.o │ │ │ ├── net.cpp.o │ │ │ ├── opencv.cpp.o │ │ │ ├── paramdict.cpp.o │ │ │ ├── pipeline.cpp.o │ │ │ └── progress.make │ │ └── progress.marks │ ├── Makefile │ ├── absval.spv.hex.h │ ├── absval_fp16a.spv.hex.h │ ├── absval_fp16s.spv.hex.h │ ├── absval_pack4.spv.hex.h │ ├── absval_pack4_fp16a.spv.hex.h │ ├── absval_pack4_fp16s.spv.hex.h │ ├── batchnorm.spv.hex.h │ ├── batchnorm_fp16a.spv.hex.h │ ├── batchnorm_fp16s.spv.hex.h │ ├── batchnorm_pack4.spv.hex.h │ ├── batchnorm_pack4_fp16a.spv.hex.h │ ├── batchnorm_pack4_fp16s.spv.hex.h │ ├── binaryop.spv.hex.h │ ├── binaryop_fp16a.spv.hex.h │ ├── binaryop_fp16s.spv.hex.h │ ├── binaryop_pack4.spv.hex.h │ ├── binaryop_pack4_fp16a.spv.hex.h │ ├── binaryop_pack4_fp16s.spv.hex.h │ ├── cast_fp16_to_fp32.spv.hex.h │ ├── cast_fp16_to_fp32_fp16a.spv.hex.h │ ├── cast_fp16_to_fp32_fp16s.spv.hex.h │ ├── cast_fp16_to_fp32_pack4.spv.hex.h │ ├── cast_fp16_to_fp32_pack4_fp16a.spv.hex.h │ ├── cast_fp16_to_fp32_pack4_fp16s.spv.hex.h │ ├── cast_fp32_to_fp16.spv.hex.h │ ├── cast_fp32_to_fp16_fp16a.spv.hex.h │ ├── cast_fp32_to_fp16_fp16s.spv.hex.h │ ├── cast_fp32_to_fp16_pack4.spv.hex.h │ ├── cast_fp32_to_fp16_pack4_fp16a.spv.hex.h │ ├── cast_fp32_to_fp16_pack4_fp16s.spv.hex.h │ ├── clip.spv.hex.h │ ├── clip_fp16a.spv.hex.h │ ├── clip_fp16s.spv.hex.h │ ├── clip_pack4.spv.hex.h │ ├── clip_pack4_fp16a.spv.hex.h │ ├── clip_pack4_fp16s.spv.hex.h │ ├── cmake_install.cmake │ ├── concat.spv.hex.h │ ├── concat_fp16a.spv.hex.h │ ├── concat_fp16s.spv.hex.h │ ├── concat_pack4.spv.hex.h │ ├── concat_pack4_fp16a.spv.hex.h │ ├── concat_pack4_fp16s.spv.hex.h │ ├── concat_pack4to1.spv.hex.h │ ├── concat_pack4to1_fp16a.spv.hex.h │ ├── concat_pack4to1_fp16s.spv.hex.h │ ├── convolution.spv.hex.h │ ├── convolution_1x1s1d1.spv.hex.h │ ├── convolution_1x1s1d1_fp16a.spv.hex.h │ ├── convolution_1x1s1d1_fp16s.spv.hex.h │ ├── convolution_fp16a.spv.hex.h │ ├── convolution_fp16s.spv.hex.h │ ├── convolution_pack1to4.spv.hex.h │ ├── convolution_pack1to4_fp16a.spv.hex.h │ ├── convolution_pack1to4_fp16s.spv.hex.h │ ├── convolution_pack4.spv.hex.h │ ├── convolution_pack4_fp16a.spv.hex.h │ ├── convolution_pack4_fp16s.spv.hex.h │ ├── convolution_pack4to1.spv.hex.h │ ├── convolution_pack4to1_fp16a.spv.hex.h │ ├── convolution_pack4to1_fp16s.spv.hex.h │ ├── convolutiondepthwise.spv.hex.h │ ├── convolutiondepthwise_fp16a.spv.hex.h │ ├── convolutiondepthwise_fp16s.spv.hex.h │ ├── convolutiondepthwise_group.spv.hex.h │ ├── convolutiondepthwise_group_fp16a.spv.hex.h │ ├── convolutiondepthwise_group_fp16s.spv.hex.h │ ├── convolutiondepthwise_group_pack1to4.spv.hex.h │ ├── convolutiondepthwise_group_pack1to4_fp16a.spv.hex.h │ ├── convolutiondepthwise_group_pack1to4_fp16s.spv.hex.h │ ├── convolutiondepthwise_group_pack4.spv.hex.h │ ├── convolutiondepthwise_group_pack4_fp16a.spv.hex.h │ ├── convolutiondepthwise_group_pack4_fp16s.spv.hex.h │ ├── convolutiondepthwise_group_pack4to1.spv.hex.h │ ├── convolutiondepthwise_group_pack4to1_fp16a.spv.hex.h │ ├── convolutiondepthwise_group_pack4to1_fp16s.spv.hex.h │ ├── convolutiondepthwise_pack4.spv.hex.h │ ├── convolutiondepthwise_pack4_fp16a.spv.hex.h │ ├── convolutiondepthwise_pack4_fp16s.spv.hex.h │ ├── crop.spv.hex.h │ ├── crop_fp16a.spv.hex.h │ ├── crop_fp16s.spv.hex.h │ ├── crop_pack4.spv.hex.h │ ├── crop_pack4_fp16a.spv.hex.h │ ├── crop_pack4_fp16s.spv.hex.h │ ├── deconvolution.spv.hex.h │ ├── deconvolution_fp16a.spv.hex.h │ ├── deconvolution_fp16s.spv.hex.h │ ├── deconvolution_pack1to4.spv.hex.h │ ├── deconvolution_pack1to4_fp16a.spv.hex.h │ ├── deconvolution_pack1to4_fp16s.spv.hex.h │ ├── deconvolution_pack4.spv.hex.h │ ├── deconvolution_pack4_fp16a.spv.hex.h │ ├── deconvolution_pack4_fp16s.spv.hex.h │ ├── deconvolution_pack4to1.spv.hex.h │ ├── deconvolution_pack4to1_fp16a.spv.hex.h │ ├── deconvolution_pack4to1_fp16s.spv.hex.h │ ├── deconvolutiondepthwise.spv.hex.h │ ├── deconvolutiondepthwise_fp16a.spv.hex.h │ ├── deconvolutiondepthwise_fp16s.spv.hex.h │ ├── deconvolutiondepthwise_group.spv.hex.h │ ├── deconvolutiondepthwise_group_fp16a.spv.hex.h │ ├── deconvolutiondepthwise_group_fp16s.spv.hex.h │ ├── deconvolutiondepthwise_group_pack1to4.spv.hex.h │ ├── deconvolutiondepthwise_group_pack1to4_fp16a.spv.hex.h │ ├── deconvolutiondepthwise_group_pack1to4_fp16s.spv.hex.h │ ├── deconvolutiondepthwise_group_pack4.spv.hex.h │ ├── deconvolutiondepthwise_group_pack4_fp16a.spv.hex.h │ ├── deconvolutiondepthwise_group_pack4_fp16s.spv.hex.h │ ├── deconvolutiondepthwise_group_pack4to1.spv.hex.h │ ├── deconvolutiondepthwise_group_pack4to1_fp16a.spv.hex.h │ ├── deconvolutiondepthwise_group_pack4to1_fp16s.spv.hex.h │ ├── deconvolutiondepthwise_pack4.spv.hex.h │ ├── deconvolutiondepthwise_pack4_fp16a.spv.hex.h │ ├── deconvolutiondepthwise_pack4_fp16s.spv.hex.h │ ├── dropout.spv.hex.h │ ├── dropout_fp16a.spv.hex.h │ ├── dropout_fp16s.spv.hex.h │ ├── dropout_pack4.spv.hex.h │ ├── dropout_pack4_fp16a.spv.hex.h │ ├── dropout_pack4_fp16s.spv.hex.h │ ├── eltwise.spv.hex.h │ ├── eltwise_fp16a.spv.hex.h │ ├── eltwise_fp16s.spv.hex.h │ ├── eltwise_pack4.spv.hex.h │ ├── eltwise_pack4_fp16a.spv.hex.h │ ├── eltwise_pack4_fp16s.spv.hex.h │ ├── flatten.spv.hex.h │ ├── flatten_fp16a.spv.hex.h │ ├── flatten_fp16s.spv.hex.h │ ├── flatten_pack4.spv.hex.h │ ├── flatten_pack4_fp16a.spv.hex.h │ ├── flatten_pack4_fp16s.spv.hex.h │ ├── innerproduct.spv.hex.h │ ├── innerproduct_fp16a.spv.hex.h │ ├── innerproduct_fp16s.spv.hex.h │ ├── innerproduct_pack1to4.spv.hex.h │ ├── innerproduct_pack1to4_fp16a.spv.hex.h │ ├── innerproduct_pack1to4_fp16s.spv.hex.h │ ├── innerproduct_pack4.spv.hex.h │ ├── innerproduct_pack4_fp16a.spv.hex.h │ ├── innerproduct_pack4_fp16s.spv.hex.h │ ├── innerproduct_pack4to1.spv.hex.h │ ├── innerproduct_pack4to1_fp16a.spv.hex.h │ ├── innerproduct_pack4to1_fp16s.spv.hex.h │ ├── interp.spv.hex.h │ ├── interp_fp16a.spv.hex.h │ ├── interp_fp16s.spv.hex.h │ ├── interp_pack4.spv.hex.h │ ├── interp_pack4_fp16a.spv.hex.h │ ├── interp_pack4_fp16s.spv.hex.h │ ├── layer_declaration.h │ ├── layer_registry.h │ ├── layer_shader_registry.h │ ├── layer_shader_spv_data.h │ ├── layer_type_enum.h │ ├── libncnn.a │ ├── lrn_norm.spv.hex.h │ ├── lrn_norm_across_channel_pack4.spv.hex.h │ ├── lrn_norm_across_channel_pack4_fp16a.spv.hex.h │ ├── lrn_norm_across_channel_pack4_fp16s.spv.hex.h │ ├── lrn_norm_fp16a.spv.hex.h │ ├── lrn_norm_fp16s.spv.hex.h │ ├── lrn_norm_within_channel_pack4.spv.hex.h │ ├── lrn_norm_within_channel_pack4_fp16a.spv.hex.h │ ├── lrn_norm_within_channel_pack4_fp16s.spv.hex.h │ ├── lrn_square_pad.spv.hex.h │ ├── lrn_square_pad_across_channel_pack4.spv.hex.h │ ├── lrn_square_pad_across_channel_pack4_fp16a.spv.hex.h │ ├── lrn_square_pad_across_channel_pack4_fp16s.spv.hex.h │ ├── lrn_square_pad_fp16a.spv.hex.h │ ├── lrn_square_pad_fp16s.spv.hex.h │ ├── lrn_square_pad_within_channel_pack4.spv.hex.h │ ├── lrn_square_pad_within_channel_pack4_fp16a.spv.hex.h │ ├── lrn_square_pad_within_channel_pack4_fp16s.spv.hex.h │ ├── packing_1to4.spv.hex.h │ ├── packing_1to4_fp16a.spv.hex.h │ ├── packing_1to4_fp16s.spv.hex.h │ ├── packing_4to1.spv.hex.h │ ├── packing_4to1_fp16a.spv.hex.h │ ├── packing_4to1_fp16s.spv.hex.h │ ├── padding.spv.hex.h │ ├── padding_fp16a.spv.hex.h │ ├── padding_fp16s.spv.hex.h │ ├── padding_pack4.spv.hex.h │ ├── padding_pack4_fp16a.spv.hex.h │ ├── padding_pack4_fp16s.spv.hex.h │ ├── permute.spv.hex.h │ ├── permute_fp16a.spv.hex.h │ ├── permute_fp16s.spv.hex.h │ ├── permute_pack4to1.spv.hex.h │ ├── permute_pack4to1_fp16a.spv.hex.h │ ├── permute_pack4to1_fp16s.spv.hex.h │ ├── platform.h │ ├── pooling.spv.hex.h │ ├── pooling_fp16a.spv.hex.h │ ├── pooling_fp16s.spv.hex.h │ ├── pooling_global.spv.hex.h │ ├── pooling_global_fp16a.spv.hex.h │ ├── pooling_global_fp16s.spv.hex.h │ ├── pooling_global_pack4.spv.hex.h │ ├── pooling_global_pack4_fp16a.spv.hex.h │ ├── pooling_global_pack4_fp16s.spv.hex.h │ ├── pooling_pack4.spv.hex.h │ ├── pooling_pack4_fp16a.spv.hex.h │ ├── pooling_pack4_fp16s.spv.hex.h │ ├── prelu.spv.hex.h │ ├── prelu_fp16a.spv.hex.h │ ├── prelu_fp16s.spv.hex.h │ ├── prelu_pack4.spv.hex.h │ ├── prelu_pack4_fp16a.spv.hex.h │ ├── prelu_pack4_fp16s.spv.hex.h │ ├── priorbox.spv.hex.h │ ├── priorbox_fp16a.spv.hex.h │ ├── priorbox_fp16s.spv.hex.h │ ├── priorbox_mxnet.spv.hex.h │ ├── priorbox_mxnet_fp16a.spv.hex.h │ ├── priorbox_mxnet_fp16s.spv.hex.h │ ├── relu.spv.hex.h │ ├── relu_fp16a.spv.hex.h │ ├── relu_fp16s.spv.hex.h │ ├── relu_pack4.spv.hex.h │ ├── relu_pack4_fp16a.spv.hex.h │ ├── relu_pack4_fp16s.spv.hex.h │ ├── reorg.spv.hex.h │ ├── reorg_fp16a.spv.hex.h │ ├── reorg_fp16s.spv.hex.h │ ├── reorg_pack1to4.spv.hex.h │ ├── reorg_pack1to4_fp16a.spv.hex.h │ ├── reorg_pack1to4_fp16s.spv.hex.h │ ├── reorg_pack4.spv.hex.h │ ├── reorg_pack4_fp16a.spv.hex.h │ ├── reorg_pack4_fp16s.spv.hex.h │ ├── reshape.spv.hex.h │ ├── reshape_fp16a.spv.hex.h │ ├── reshape_fp16s.spv.hex.h │ ├── reshape_pack1to4.spv.hex.h │ ├── reshape_pack1to4_fp16a.spv.hex.h │ ├── reshape_pack1to4_fp16s.spv.hex.h │ ├── reshape_pack4.spv.hex.h │ ├── reshape_pack4_fp16a.spv.hex.h │ ├── reshape_pack4_fp16s.spv.hex.h │ ├── reshape_pack4to1.spv.hex.h │ ├── reshape_pack4to1_fp16a.spv.hex.h │ ├── reshape_pack4to1_fp16s.spv.hex.h │ ├── scale.spv.hex.h │ ├── scale_fp16a.spv.hex.h │ ├── scale_fp16s.spv.hex.h │ ├── scale_pack4.spv.hex.h │ ├── scale_pack4_fp16a.spv.hex.h │ ├── scale_pack4_fp16s.spv.hex.h │ ├── shufflechannel.spv.hex.h │ ├── shufflechannel_fp16a.spv.hex.h │ ├── shufflechannel_fp16s.spv.hex.h │ ├── shufflechannel_pack4.spv.hex.h │ ├── shufflechannel_pack4_fp16a.spv.hex.h │ ├── shufflechannel_pack4_fp16s.spv.hex.h │ ├── sigmoid.spv.hex.h │ ├── sigmoid_fp16a.spv.hex.h │ ├── sigmoid_fp16s.spv.hex.h │ ├── sigmoid_pack4.spv.hex.h │ ├── sigmoid_pack4_fp16a.spv.hex.h │ ├── sigmoid_pack4_fp16s.spv.hex.h │ ├── softmax_div_sum.spv.hex.h │ ├── softmax_div_sum_fp16a.spv.hex.h │ ├── softmax_div_sum_fp16s.spv.hex.h │ ├── softmax_div_sum_pack4.spv.hex.h │ ├── softmax_div_sum_pack4_fp16a.spv.hex.h │ ├── softmax_div_sum_pack4_fp16s.spv.hex.h │ ├── softmax_exp_sub_max.spv.hex.h │ ├── softmax_exp_sub_max_fp16a.spv.hex.h │ ├── softmax_exp_sub_max_fp16s.spv.hex.h │ ├── softmax_exp_sub_max_pack4.spv.hex.h │ ├── softmax_exp_sub_max_pack4_fp16a.spv.hex.h │ ├── softmax_exp_sub_max_pack4_fp16s.spv.hex.h │ ├── softmax_reduce_max.spv.hex.h │ ├── softmax_reduce_max_fp16a.spv.hex.h │ ├── softmax_reduce_max_fp16s.spv.hex.h │ ├── softmax_reduce_max_pack4.spv.hex.h │ ├── softmax_reduce_max_pack4_fp16a.spv.hex.h │ ├── softmax_reduce_max_pack4_fp16s.spv.hex.h │ ├── softmax_reduce_sum.spv.hex.h │ ├── softmax_reduce_sum_fp16a.spv.hex.h │ ├── softmax_reduce_sum_fp16s.spv.hex.h │ ├── softmax_reduce_sum_pack4.spv.hex.h │ ├── softmax_reduce_sum_pack4_fp16a.spv.hex.h │ ├── softmax_reduce_sum_pack4_fp16s.spv.hex.h │ ├── tanh.spv.hex.h │ ├── tanh_fp16a.spv.hex.h │ ├── tanh_fp16s.spv.hex.h │ ├── tanh_pack4.spv.hex.h │ ├── tanh_pack4_fp16a.spv.hex.h │ ├── tanh_pack4_fp16s.spv.hex.h │ ├── unaryop.spv.hex.h │ ├── unaryop_fp16a.spv.hex.h │ ├── unaryop_fp16s.spv.hex.h │ ├── unaryop_pack4.spv.hex.h │ ├── unaryop_pack4_fp16a.spv.hex.h │ └── unaryop_pack4_fp16s.spv.hex.h └── src │ ├── CMakeLists.txt │ ├── allocator.cpp │ ├── allocator.h │ ├── benchmark.cpp │ ├── benchmark.h │ ├── blob.cpp │ ├── blob.h │ ├── command.cpp │ ├── command.h │ ├── cpu.cpp │ ├── cpu.h │ ├── gpu.cpp │ ├── gpu.h │ ├── layer.cpp │ ├── layer.h │ ├── layer │ ├── absval.cpp │ ├── absval.h │ ├── argmax.cpp │ ├── argmax.h │ ├── arm │ │ ├── absval_arm.cpp │ │ ├── absval_arm.h │ │ ├── batchnorm_arm.cpp │ │ ├── batchnorm_arm.h │ │ ├── bias_arm.cpp │ │ ├── bias_arm.h │ │ ├── clip_arm.cpp │ │ ├── clip_arm.h │ │ ├── convolution_1x1.h │ │ ├── convolution_1x1_int8.h │ │ ├── convolution_2x2.h │ │ ├── convolution_3x3.h │ │ ├── convolution_3x3_int8.h │ │ ├── convolution_4x4.h │ │ ├── convolution_5x5.h │ │ ├── convolution_5x5_int8.h │ │ ├── convolution_7x7.h │ │ ├── convolution_7x7_int8.h │ │ ├── convolution_arm.cpp │ │ ├── convolution_arm.h │ │ ├── convolution_sgemm_int8.h │ │ ├── convolutiondepthwise_3x3.h │ │ ├── convolutiondepthwise_3x3_int8.h │ │ ├── convolutiondepthwise_5x5.h │ │ ├── convolutiondepthwise_arm.cpp │ │ ├── convolutiondepthwise_arm.h │ │ ├── deconvolution_3x3.h │ │ ├── deconvolution_4x4.h │ │ ├── deconvolution_arm.cpp │ │ ├── deconvolution_arm.h │ │ ├── deconvolutiondepthwise_arm.cpp │ │ ├── deconvolutiondepthwise_arm.h │ │ ├── dequantize_arm.cpp │ │ ├── dequantize_arm.h │ │ ├── eltwise_arm.cpp │ │ ├── eltwise_arm.h │ │ ├── innerproduct_arm.cpp │ │ ├── innerproduct_arm.h │ │ ├── interp_arm.cpp │ │ ├── interp_arm.h │ │ ├── lrn_arm.cpp │ │ ├── lrn_arm.h │ │ ├── neon_mathfun.h │ │ ├── pooling_2x2.h │ │ ├── pooling_3x3.h │ │ ├── pooling_arm.cpp │ │ ├── pooling_arm.h │ │ ├── prelu_arm.cpp │ │ ├── prelu_arm.h │ │ ├── quantize_arm.cpp │ │ ├── quantize_arm.h │ │ ├── relu_arm.cpp │ │ ├── relu_arm.h │ │ ├── requantize_arm.cpp │ │ ├── requantize_arm.h │ │ ├── scale_arm.cpp │ │ ├── scale_arm.h │ │ ├── sigmoid_arm.cpp │ │ ├── sigmoid_arm.h │ │ ├── softmax_arm.cpp │ │ └── softmax_arm.h │ ├── batchnorm.cpp │ ├── batchnorm.h │ ├── bias.cpp │ ├── bias.h │ ├── binaryop.cpp │ ├── binaryop.h │ ├── bnll.cpp │ ├── bnll.h │ ├── cast.cpp │ ├── cast.h │ ├── clip.cpp │ ├── clip.h │ ├── concat.cpp │ ├── concat.h │ ├── convolution.cpp │ ├── convolution.h │ ├── convolutiondepthwise.cpp │ ├── convolutiondepthwise.h │ ├── crop.cpp │ ├── crop.h │ ├── deconvolution.cpp │ ├── deconvolution.h │ ├── deconvolutiondepthwise.cpp │ ├── deconvolutiondepthwise.h │ ├── dequantize.cpp │ ├── dequantize.h │ ├── detectionoutput.cpp │ ├── detectionoutput.h │ ├── dropout.cpp │ ├── dropout.h │ ├── eltwise.cpp │ ├── eltwise.h │ ├── elu.cpp │ ├── elu.h │ ├── embed.cpp │ ├── embed.h │ ├── exp.cpp │ ├── exp.h │ ├── expanddims.cpp │ ├── expanddims.h │ ├── flatten.cpp │ ├── flatten.h │ ├── innerproduct.cpp │ ├── innerproduct.h │ ├── input.cpp │ ├── input.h │ ├── instancenorm.cpp │ ├── instancenorm.h │ ├── interp.cpp │ ├── interp.h │ ├── log.cpp │ ├── log.h │ ├── lrn.cpp │ ├── lrn.h │ ├── lstm.cpp │ ├── lstm.h │ ├── matmul.cpp │ ├── matmul.h │ ├── memorydata.cpp │ ├── memorydata.h │ ├── mvn.cpp │ ├── mvn.h │ ├── normalize.cpp │ ├── normalize.h │ ├── packing.cpp │ ├── packing.h │ ├── padding.cpp │ ├── padding.h │ ├── permute.cpp │ ├── permute.h │ ├── pooling.cpp │ ├── pooling.h │ ├── power.cpp │ ├── power.h │ ├── prelu.cpp │ ├── prelu.h │ ├── priorbox.cpp │ ├── priorbox.h │ ├── proposal.cpp │ ├── proposal.h │ ├── psroipooling.cpp │ ├── psroipooling.h │ ├── quantize.cpp │ ├── quantize.h │ ├── reduction.cpp │ ├── reduction.h │ ├── relu.cpp │ ├── relu.h │ ├── reorg.cpp │ ├── reorg.h │ ├── requantize.cpp │ ├── requantize.h │ ├── reshape.cpp │ ├── reshape.h │ ├── rnn.cpp │ ├── rnn.h │ ├── roialign.cpp │ ├── roialign.h │ ├── roipooling.cpp │ ├── roipooling.h │ ├── scale.cpp │ ├── scale.h │ ├── shader │ │ ├── absval.comp │ │ ├── absval_pack4.comp │ │ ├── batchnorm.comp │ │ ├── batchnorm_pack4.comp │ │ ├── binaryop.comp │ │ ├── binaryop_pack4.comp │ │ ├── cast_fp16_to_fp32.comp │ │ ├── cast_fp16_to_fp32_pack4.comp │ │ ├── cast_fp32_to_fp16.comp │ │ ├── cast_fp32_to_fp16_pack4.comp │ │ ├── clip.comp │ │ ├── clip_pack4.comp │ │ ├── concat.comp │ │ ├── concat_pack4.comp │ │ ├── concat_pack4to1.comp │ │ ├── convolution.comp │ │ ├── convolution_1x1s1d1.comp │ │ ├── convolution_pack1to4.comp │ │ ├── convolution_pack4.comp │ │ ├── convolution_pack4to1.comp │ │ ├── convolutiondepthwise.comp │ │ ├── convolutiondepthwise_group.comp │ │ ├── convolutiondepthwise_group_pack1to4.comp │ │ ├── convolutiondepthwise_group_pack4.comp │ │ ├── convolutiondepthwise_group_pack4to1.comp │ │ ├── convolutiondepthwise_pack4.comp │ │ ├── crop.comp │ │ ├── crop_pack4.comp │ │ ├── deconvolution.comp │ │ ├── deconvolution_pack1to4.comp │ │ ├── deconvolution_pack4.comp │ │ ├── deconvolution_pack4to1.comp │ │ ├── deconvolutiondepthwise.comp │ │ ├── deconvolutiondepthwise_group.comp │ │ ├── deconvolutiondepthwise_group_pack1to4.comp │ │ ├── deconvolutiondepthwise_group_pack4.comp │ │ ├── deconvolutiondepthwise_group_pack4to1.comp │ │ ├── deconvolutiondepthwise_pack4.comp │ │ ├── dropout.comp │ │ ├── dropout_pack4.comp │ │ ├── eltwise.comp │ │ ├── eltwise_pack4.comp │ │ ├── flatten.comp │ │ ├── flatten_pack4.comp │ │ ├── innerproduct.comp │ │ ├── innerproduct_pack1to4.comp │ │ ├── innerproduct_pack4.comp │ │ ├── innerproduct_pack4to1.comp │ │ ├── interp.comp │ │ ├── interp_pack4.comp │ │ ├── lrn_norm.comp │ │ ├── lrn_norm_across_channel_pack4.comp │ │ ├── lrn_norm_within_channel_pack4.comp │ │ ├── lrn_square_pad.comp │ │ ├── lrn_square_pad_across_channel_pack4.comp │ │ ├── lrn_square_pad_within_channel_pack4.comp │ │ ├── packing_1to4.comp │ │ ├── packing_4to1.comp │ │ ├── padding.comp │ │ ├── padding_pack4.comp │ │ ├── permute.comp │ │ ├── permute_pack4to1.comp │ │ ├── pooling.comp │ │ ├── pooling_global.comp │ │ ├── pooling_global_pack4.comp │ │ ├── pooling_pack4.comp │ │ ├── prelu.comp │ │ ├── prelu_pack4.comp │ │ ├── priorbox.comp │ │ ├── priorbox_mxnet.comp │ │ ├── relu.comp │ │ ├── relu_pack4.comp │ │ ├── reorg.comp │ │ ├── reorg_pack1to4.comp │ │ ├── reorg_pack4.comp │ │ ├── reshape.comp │ │ ├── reshape_pack1to4.comp │ │ ├── reshape_pack4.comp │ │ ├── reshape_pack4to1.comp │ │ ├── scale.comp │ │ ├── scale_pack4.comp │ │ ├── shufflechannel.comp │ │ ├── shufflechannel_pack4.comp │ │ ├── sigmoid.comp │ │ ├── sigmoid_pack4.comp │ │ ├── softmax_div_sum.comp │ │ ├── softmax_div_sum_pack4.comp │ │ ├── softmax_exp_sub_max.comp │ │ ├── softmax_exp_sub_max_pack4.comp │ │ ├── softmax_reduce_max.comp │ │ ├── softmax_reduce_max_pack4.comp │ │ ├── softmax_reduce_sum.comp │ │ ├── softmax_reduce_sum_pack4.comp │ │ ├── tanh.comp │ │ ├── tanh_pack4.comp │ │ ├── unaryop.comp │ │ └── unaryop_pack4.comp │ ├── shufflechannel.cpp │ ├── shufflechannel.h │ ├── sigmoid.cpp │ ├── sigmoid.h │ ├── slice.cpp │ ├── slice.h │ ├── softmax.cpp │ ├── softmax.h │ ├── split.cpp │ ├── split.h │ ├── spp.cpp │ ├── spp.h │ ├── squeeze.cpp │ ├── squeeze.h │ ├── tanh.cpp │ ├── tanh.h │ ├── threshold.cpp │ ├── threshold.h │ ├── tile.cpp │ ├── tile.h │ ├── unaryop.cpp │ ├── unaryop.h │ ├── x86 │ │ ├── avx_mathfun.h │ │ ├── convolution_1x1.h │ │ ├── convolution_1x1_int8.h │ │ ├── convolution_3x3.h │ │ ├── convolution_3x3_int8.h │ │ ├── convolution_5x5.h │ │ ├── convolution_5x5_int8.h │ │ ├── convolution_7x7_int8.h │ │ ├── convolution_sgemm_int8.h │ │ ├── convolution_x86.cpp │ │ ├── convolution_x86.h │ │ ├── convolutiondepthwise_3x3.h │ │ ├── convolutiondepthwise_3x3_int8.h │ │ ├── convolutiondepthwise_x86.cpp │ │ ├── convolutiondepthwise_x86.h │ │ └── sse_mathfun.h │ ├── yolodetectionoutput.cpp │ ├── yolodetectionoutput.h │ ├── yolov3detectionoutput.cpp │ └── yolov3detectionoutput.h │ ├── layer_declaration.h.in │ ├── layer_registry.h.in │ ├── layer_shader_registry.h.in │ ├── layer_shader_spv_data.h.in │ ├── layer_type.h │ ├── layer_type_enum.h.in │ ├── mat.cpp │ ├── mat.h │ ├── mat_pixel.cpp │ ├── mat_pixel_resize.cpp │ ├── modelbin.cpp │ ├── modelbin.h │ ├── net.cpp │ ├── net.h │ ├── opencv.cpp │ ├── opencv.h │ ├── paramdict.cpp │ ├── paramdict.h │ ├── pipeline.cpp │ ├── pipeline.h │ └── platform.h.in └── testSupport ├── TestSupport.h ├── TestSupport.mm ├── Test_LoadModelData.h ├── Test_LoadModelData.mm ├── mouth.png ├── result_info.json ├── squeezenet_v1.1.bin └── squeezenet_v1.1.param /.gitignore: -------------------------------------------------------------------------------- 1 | project.xcworkspace 2 | xcuserdata 3 | -------------------------------------------------------------------------------- /MoltenVK/iOS/framework/MoltenVK.framework/MoltenVK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/MoltenVK/iOS/framework/MoltenVK.framework/MoltenVK -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/NcnnFrmDemo_MoltenVK/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // NcnnFrmDemo_MoltenVK 4 | // 5 | // Created by Chris on 2019/4/4. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/NcnnFrmDemo_MoltenVK/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/NcnnFrmDemo_MoltenVK/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // NcnnFrmDemo_MoltenVK 4 | // 5 | // Created by Chris on 2019/4/4. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/NcnnFrmDemo_MoltenVK/ViewController.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // NcnnFrmDemo_MoltenVK 4 | // 5 | // Created by Chris on 2019/4/4. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import "TestSupport.h" 10 | #import "ViewController.h" 11 | 12 | #define __USE_VULKAN 1 13 | 14 | @interface ViewController () { 15 | ncnn::Net ncnn_net; 16 | } 17 | 18 | @end 19 | 20 | @implementation ViewController 21 | 22 | - (void)dealloc { 23 | #if __USE_VULKAN 24 | ncnn::destroy_gpu_instance(); 25 | #endif 26 | } 27 | 28 | - (void)viewDidLoad { 29 | [super viewDidLoad]; 30 | #if __USE_VULKAN 31 | ncnn::create_gpu_instance(); 32 | ncnn_net.use_vulkan_compute = 1; 33 | #endif 34 | 35 | ts_load_model(ncnn_net); 36 | [self detect]; 37 | } 38 | 39 | #pragma mark - 40 | 41 | - (void)detect { 42 | 43 | /* 提取输出 */ 44 | ncnn::Mat mat_dst; 45 | ts_detect(mat_dst, ncnn_net); 46 | 47 | /* 输出规范化 */ 48 | NSArray *rstArray = ts_mat2array(mat_dst); 49 | NSArray *top5Array = ts_topN(rstArray, 5); 50 | 51 | /* 打印输出 */ 52 | NSLog(@"%@", top5Array); 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/NcnnFrmDemo_MoltenVK/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NcnnFrmDemo_MoltenVK 4 | // 5 | // Created by Chris on 2019/4/4. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/Versions/A/Headers/benchmark.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_BENCHMARK_H 16 | #define NCNN_BENCHMARK_H 17 | 18 | #include "platform.h" 19 | #include "mat.h" 20 | #include "layer.h" 21 | 22 | namespace ncnn { 23 | 24 | // get now timestamp in ms 25 | double get_current_time(); 26 | 27 | #if NCNN_BENCHMARK 28 | 29 | void benchmark(const Layer* layer, double start, double end); 30 | void benchmark(const Layer* layer, const Mat& bottom_blob, Mat& top_blob, double start, double end); 31 | 32 | #endif // NCNN_BENCHMARK 33 | 34 | } // namespace ncnn 35 | 36 | #endif // NCNN_BENCHMARK_H 37 | -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/Versions/A/Headers/blob.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_BLOB_H 16 | #define NCNN_BLOB_H 17 | 18 | #include 19 | #include 20 | #include "platform.h" 21 | 22 | namespace ncnn { 23 | 24 | class Blob 25 | { 26 | public: 27 | // empty 28 | Blob(); 29 | 30 | public: 31 | #if NCNN_STRING 32 | // blob name 33 | std::string name; 34 | #endif // NCNN_STRING 35 | // layer index which produce this blob as output 36 | int producer; 37 | // layer index which need this blob as input 38 | std::vector consumers; 39 | }; 40 | 41 | } // namespace ncnn 42 | 43 | #endif // NCNN_BLOB_H 44 | -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/Versions/A/Headers/layer_type.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_LAYER_TYPE_H 16 | #define NCNN_LAYER_TYPE_H 17 | 18 | namespace ncnn { 19 | 20 | namespace LayerType { 21 | enum 22 | { 23 | #include "layer_type_enum.h" 24 | CustomBit = (1<<8), 25 | }; 26 | } // namespace LayerType 27 | 28 | } // namespace ncnn 29 | 30 | #endif // NCNN_LAYER_TYPE_H 31 | -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/Versions/A/Headers/layer_type_enum.h: -------------------------------------------------------------------------------- 1 | // Layer Type Enum header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | AbsVal = 0, 6 | ArgMax = 1, 7 | BatchNorm = 2, 8 | Bias = 3, 9 | BNLL = 4, 10 | Concat = 5, 11 | Convolution = 6, 12 | Crop = 7, 13 | Deconvolution = 8, 14 | Dropout = 9, 15 | Eltwise = 10, 16 | ELU = 11, 17 | Embed = 12, 18 | Exp = 13, 19 | Flatten = 14, 20 | InnerProduct = 15, 21 | Input = 16, 22 | Log = 17, 23 | LRN = 18, 24 | MemoryData = 19, 25 | MVN = 20, 26 | Pooling = 21, 27 | Power = 22, 28 | PReLU = 23, 29 | Proposal = 24, 30 | Reduction = 25, 31 | ReLU = 26, 32 | Reshape = 27, 33 | ROIPooling = 28, 34 | Scale = 29, 35 | Sigmoid = 30, 36 | Slice = 31, 37 | Softmax = 32, 38 | Split = 33, 39 | SPP = 34, 40 | TanH = 35, 41 | Threshold = 36, 42 | Tile = 37, 43 | RNN = 38, 44 | LSTM = 39, 45 | BinaryOp = 40, 46 | UnaryOp = 41, 47 | ConvolutionDepthWise = 42, 48 | Padding = 43, 49 | Squeeze = 44, 50 | ExpandDims = 45, 51 | Normalize = 46, 52 | Permute = 47, 53 | PriorBox = 48, 54 | DetectionOutput = 49, 55 | Interp = 50, 56 | DeconvolutionDepthWise = 51, 57 | ShuffleChannel = 52, 58 | InstanceNorm = 53, 59 | Clip = 54, 60 | Reorg = 55, 61 | YoloDetectionOutput = 56, 62 | Quantize = 57, 63 | Dequantize = 58, 64 | Yolov3DetectionOutput = 59, 65 | PSROIPooling = 60, 66 | ROIAlign = 61, 67 | Packing = 62, 68 | MatMul = 63, 69 | Requantize = 64, 70 | Cast = 65, 71 | 72 | -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/Versions/A/Headers/platform.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_PLATFORM_H 16 | #define NCNN_PLATFORM_H 17 | 18 | #define NCNN_STDIO 1 19 | #define NCNN_STRING 1 20 | #define NCNN_OPENCV 0 21 | #define NCNN_BENCHMARK 0 22 | #define NCNN_PIXEL 1 23 | #define NCNN_PIXEL_ROTATE 0 24 | #define NCNN_VULKAN 1 25 | #define NCNN_REQUANT 0 26 | #define NCNN_IM2COL_SGEMM 0 27 | 28 | #endif // NCNN_PLATFORM_H 29 | -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | ncnn 7 | CFBundleIdentifier 8 | com.tencent.ncnn 9 | CFBundleVersion 10 | 1.0 11 | CFBundleShortVersionString 12 | 1.0 13 | CFBundleSignature 14 | ???? 15 | CFBundlePackageType 16 | FMWK 17 | 18 | 19 | -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/Versions/A/ncnn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnFrmDemo_MoltenVK/ncnn.framework/Versions/A/ncnn -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /NcnnFrmDemo_MoltenVK/ncnn.framework/ncnn: -------------------------------------------------------------------------------- 1 | Versions/Current/ncnn -------------------------------------------------------------------------------- /NcnnSrcDemo/NcnnSrcDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // NcnnSrcDemo 4 | // 5 | // Created by Chris on 2019/3/27. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /NcnnSrcDemo/NcnnSrcDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /NcnnSrcDemo/NcnnSrcDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // NcnnSrcDemo 4 | // 5 | // Created by Chris on 2019/3/27. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /NcnnSrcDemo/NcnnSrcDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NcnnSrcDemo 4 | // 5 | // Created by Chris on 2019/3/27. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/benchmark.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_BENCHMARK_H 16 | #define NCNN_BENCHMARK_H 17 | 18 | #include "platform.h" 19 | #include "mat.h" 20 | #include "layer.h" 21 | 22 | namespace ncnn { 23 | 24 | // get now timestamp in ms 25 | double get_current_time(); 26 | 27 | #if NCNN_BENCHMARK 28 | 29 | void benchmark(const Layer* layer, double start, double end); 30 | void benchmark(const Layer* layer, const Mat& bottom_blob, Mat& top_blob, double start, double end); 31 | 32 | #endif // NCNN_BENCHMARK 33 | 34 | } // namespace ncnn 35 | 36 | #endif // NCNN_BENCHMARK_H 37 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/blob.cpp: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #include "blob.h" 16 | 17 | namespace ncnn { 18 | 19 | Blob::Blob() 20 | { 21 | producer = -1; 22 | } 23 | 24 | } // namespace ncnn 25 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/blob.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_BLOB_H 16 | #define NCNN_BLOB_H 17 | 18 | #include 19 | #include 20 | #include "platform.h" 21 | 22 | namespace ncnn { 23 | 24 | class Blob 25 | { 26 | public: 27 | // empty 28 | Blob(); 29 | 30 | public: 31 | #if NCNN_STRING 32 | // blob name 33 | std::string name; 34 | #endif // NCNN_STRING 35 | // layer index which produce this blob as output 36 | int producer; 37 | // layer index which need this blob as input 38 | std::vector consumers; 39 | }; 40 | 41 | } // namespace ncnn 42 | 43 | #endif // NCNN_BLOB_H 44 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/absval.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ABSVAL_H 16 | #define LAYER_ABSVAL_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class AbsVal : public Layer 23 | { 24 | public: 25 | AbsVal(); 26 | 27 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 28 | 29 | public: 30 | }; 31 | 32 | } // namespace ncnn 33 | 34 | #endif // LAYER_ABSVAL_H 35 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/argmax.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ARGMAX_H 16 | #define LAYER_ARGMAX_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ArgMax : public Layer 23 | { 24 | public: 25 | ArgMax(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int out_max_val; 33 | int topk; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_ARGMAX_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/absval_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ABSVAL_ARM_H 16 | #define LAYER_ABSVAL_ARM_H 17 | 18 | #include "absval.h" 19 | 20 | namespace ncnn { 21 | 22 | class AbsVal_arm : public AbsVal 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_ABSVAL_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/batchnorm_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_BATCHNORM_ARM_H 16 | #define LAYER_BATCHNORM_ARM_H 17 | 18 | #include "batchnorm.h" 19 | 20 | namespace ncnn { 21 | 22 | class BatchNorm_arm : public BatchNorm 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_BATCHNORM_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/bias_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_BIAS_ARM_H 16 | #define LAYER_BIAS_ARM_H 17 | 18 | #include "bias.h" 19 | 20 | namespace ncnn { 21 | 22 | class Bias_arm : public Bias 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_BIAS_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/clip_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_CLIP_ARM_H 16 | #define LAYER_CLIP_ARM_H 17 | 18 | #include "clip.h" 19 | 20 | namespace ncnn { 21 | 22 | class Clip_arm : public Clip 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_CLIP_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/convolutiondepthwise_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_CONVOLUTIONDEPTHWISE_ARM_H 16 | #define LAYER_CONVOLUTIONDEPTHWISE_ARM_H 17 | 18 | #include "convolutiondepthwise.h" 19 | 20 | namespace ncnn { 21 | 22 | class ConvolutionDepthWise_arm : public ConvolutionDepthWise 23 | { 24 | public: 25 | ConvolutionDepthWise_arm(); 26 | virtual ~ConvolutionDepthWise_arm(); 27 | 28 | virtual int load_model(const ModelBin& mb); 29 | 30 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 31 | 32 | public: 33 | std::vector group_ops; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_CONVOLUTIONDEPTHWISE_ARM_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/deconvolution_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_DECONVOLUTION_ARM_H 16 | #define LAYER_DECONVOLUTION_ARM_H 17 | 18 | #include "deconvolution.h" 19 | 20 | namespace ncnn { 21 | 22 | class Deconvolution_arm : public Deconvolution 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_DECONVOLUTION_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/deconvolutiondepthwise_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_DECONVOLUTIONDEPTHWISE_ARM_H 16 | #define LAYER_DECONVOLUTIONDEPTHWISE_ARM_H 17 | 18 | #include "deconvolutiondepthwise.h" 19 | 20 | namespace ncnn { 21 | 22 | class DeconvolutionDepthWise_arm : public DeconvolutionDepthWise 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_DECONVOLUTIONDEPTHWISE_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/dequantize_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_DEQUANTIZE_ARM_H 16 | #define LAYER_DEQUANTIZE_ARM_H 17 | 18 | #include "dequantize.h" 19 | 20 | namespace ncnn { 21 | 22 | class Dequantize_arm : public Dequantize 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_DEQUANTIZE_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/eltwise_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ELTWISE_ARM_H 16 | #define LAYER_ELTWISE_ARM_H 17 | 18 | #include "eltwise.h" 19 | 20 | namespace ncnn { 21 | 22 | class Eltwise_arm : public Eltwise 23 | { 24 | public: 25 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_ELTWISE_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/innerproduct_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_INNERPRODUCT_ARM_H 16 | #define LAYER_INNERPRODUCT_ARM_H 17 | 18 | #include "innerproduct.h" 19 | 20 | namespace ncnn { 21 | 22 | class InnerProduct_arm : public InnerProduct 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_INNERPRODUCT_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/lrn_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_LRN_ARM_H 16 | #define LAYER_LRN_ARM_H 17 | 18 | #include "lrn.h" 19 | 20 | namespace ncnn { 21 | 22 | class LRN_arm : public LRN 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_LRN_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/pooling_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_POOLING_ARM_H 16 | #define LAYER_POOLING_ARM_H 17 | 18 | #include "pooling.h" 19 | 20 | namespace ncnn { 21 | 22 | class Pooling_arm : public Pooling 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_POOLING_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/prelu_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_PRELU_ARM_H 16 | #define LAYER_PRELU_ARM_H 17 | 18 | #include "prelu.h" 19 | 20 | namespace ncnn { 21 | 22 | class PReLU_arm : public PReLU 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_PRELU_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/quantize_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_QUANTIZE_ARM_H 16 | #define LAYER_QUANTIZE_ARM_H 17 | 18 | #include "quantize.h" 19 | 20 | namespace ncnn { 21 | 22 | class Quantize_arm : public Quantize 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_QUANTIZE_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/relu_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_RELU_ARM_H 16 | #define LAYER_RELU_ARM_H 17 | 18 | #include "relu.h" 19 | 20 | namespace ncnn { 21 | 22 | class ReLU_arm : public ReLU 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_RELU_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/scale_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SCALE_ARM_H 16 | #define LAYER_SCALE_ARM_H 17 | 18 | #include "scale.h" 19 | 20 | namespace ncnn { 21 | 22 | class Scale_arm : public Scale 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_SCALE_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/sigmoid_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SIGMOID_ARM_H 16 | #define LAYER_SIGMOID_ARM_H 17 | 18 | #include "sigmoid.h" 19 | 20 | namespace ncnn { 21 | 22 | class Sigmoid_arm : public Sigmoid 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_SIGMOID_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/arm/softmax_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SOFTMAX_ARM_H 16 | #define LAYER_SOFTMAX_ARM_H 17 | 18 | #include "softmax.h" 19 | 20 | namespace ncnn { 21 | 22 | class Softmax_arm : public Softmax 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_SOFTMAX_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/bias.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_BIAS_H 16 | #define LAYER_BIAS_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Bias : public Layer 23 | { 24 | public: 25 | Bias(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int load_model(const ModelBin& mb); 30 | 31 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 32 | 33 | public: 34 | // param 35 | int bias_data_size; 36 | 37 | // model 38 | Mat bias_data; 39 | }; 40 | 41 | } // namespace ncnn 42 | 43 | #endif // LAYER_BIAS_H 44 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/bnll.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_BNLL_H 16 | #define LAYER_BNLL_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class BNLL : public Layer 23 | { 24 | public: 25 | BNLL(); 26 | 27 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 28 | 29 | public: 30 | }; 31 | 32 | } // namespace ncnn 33 | 34 | #endif // LAYER_BNLL_H 35 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/clip.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_CLIP_H 16 | #define LAYER_CLIP_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Clip : public Layer 23 | { 24 | public: 25 | Clip(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float min; 33 | float max; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_CLIP_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/concat.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_CONCAT_H 16 | #define LAYER_CONCAT_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Concat : public Layer 23 | { 24 | public: 25 | Concat(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 30 | 31 | #if NCNN_VULKAN 32 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, VkCompute& cmd, const Option& opt) const; 33 | #endif // NCNN_VULKAN 34 | 35 | public: 36 | int axis; 37 | }; 38 | 39 | } // namespace ncnn 40 | 41 | #endif // LAYER_CONCAT_H 42 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/crop.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_CROP_H 16 | #define LAYER_CROP_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Crop : public Layer 23 | { 24 | public: 25 | Crop(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 32 | 33 | public: 34 | int woffset; 35 | int hoffset; 36 | int coffset; 37 | int outw; 38 | int outh; 39 | int outc; 40 | }; 41 | 42 | } // namespace ncnn 43 | 44 | #endif // LAYER_CROP_H 45 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/dequantize.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_DEQUANTIZE_H 16 | #define LAYER_DEQUANTIZE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Dequantize : public Layer 23 | { 24 | public: 25 | Dequantize(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int load_model(const ModelBin& mb); 30 | 31 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 32 | 33 | public: 34 | float scale; 35 | int bias_term; 36 | int bias_data_size; 37 | 38 | Mat bias_data; 39 | }; 40 | 41 | } // namespace ncnn 42 | 43 | #endif // LAYER_DEQUANTIZE_H 44 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/detectionoutput.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_DETECTIONOUTPUT_H 16 | #define LAYER_DETECTIONOUTPUT_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class DetectionOutput : public Layer 23 | { 24 | public: 25 | DetectionOutput(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 30 | 31 | public: 32 | int num_class; 33 | float nms_threshold; 34 | int nms_top_k; 35 | int keep_top_k; 36 | float confidence_threshold; 37 | float variances[4]; 38 | }; 39 | 40 | } // namespace ncnn 41 | 42 | #endif // LAYER_DETECTIONOUTPUT_H 43 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/elu.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ELU_H 16 | #define LAYER_ELU_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ELU : public Layer 23 | { 24 | public: 25 | ELU(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float alpha; 33 | }; 34 | 35 | } // namespace ncnn 36 | 37 | #endif // LAYER_ELU_H 38 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/embed.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_EMBED_H 16 | #define LAYER_EMBED_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Embed : public Layer 23 | { 24 | public: 25 | Embed(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int load_model(const ModelBin& mb); 30 | 31 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 32 | 33 | public: 34 | // param 35 | int num_output; 36 | int input_dim; 37 | int bias_term; 38 | 39 | int weight_data_size; 40 | 41 | // model 42 | Mat weight_data; 43 | Mat bias_data; 44 | }; 45 | 46 | } // namespace ncnn 47 | 48 | #endif // LAYER_EMBED_H 49 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/exp.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_EXP_H 16 | #define LAYER_EXP_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Exp : public Layer 23 | { 24 | public: 25 | Exp(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float base; 33 | float scale; 34 | float shift; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_EXP_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/expanddims.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_EXPANDDIMS_H 16 | #define LAYER_EXPANDDIMS_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ExpandDims : public Layer 23 | { 24 | public: 25 | ExpandDims(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int expand_w; 33 | int expand_h; 34 | int expand_c; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_EXPANDDIMS_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/flatten.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_FLATTEN_H 16 | #define LAYER_FLATTEN_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Flatten : public Layer 23 | { 24 | public: 25 | Flatten(); 26 | 27 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 28 | 29 | #if NCNN_VULKAN 30 | virtual int forward(const VkMat& bottom_blob, VkMat& top_blob, VkCompute& cmd, const Option& opt) const; 31 | #endif // NCNN_VULKAN 32 | }; 33 | 34 | } // namespace ncnn 35 | 36 | #endif // LAYER_FLATTEN_H 37 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/input.cpp: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #include "input.h" 16 | 17 | namespace ncnn { 18 | 19 | DEFINE_LAYER_CREATOR(Input) 20 | 21 | Input::Input() 22 | { 23 | one_blob_only = true; 24 | support_inplace = true; 25 | support_vulkan = false; 26 | } 27 | 28 | int Input::load_param(const ParamDict& pd) 29 | { 30 | w = pd.get(0, 0); 31 | h = pd.get(1, 0); 32 | c = pd.get(2, 0); 33 | 34 | return 0; 35 | } 36 | 37 | int Input::forward_inplace(Mat& /*bottom_top_blob*/, const Option& /*opt*/) const 38 | { 39 | return 0; 40 | } 41 | 42 | } // namespace ncnn 43 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/input.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_INPUT_H 16 | #define LAYER_INPUT_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Input : public Layer 23 | { 24 | public: 25 | Input(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | int w; 33 | int h; 34 | int c; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_INPUT_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/instancenorm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_INSTANCENORM_H 16 | #define LAYER_INSTANCENORM_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class InstanceNorm : public Layer 23 | { 24 | public: 25 | InstanceNorm(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int load_model(const ModelBin& mb); 30 | 31 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 32 | 33 | public: 34 | // param 35 | int channels; 36 | float eps; 37 | 38 | // model 39 | Mat gamma_data; 40 | Mat beta_data; 41 | }; 42 | 43 | } // namespace ncnn 44 | 45 | #endif // LAYER_INSTANCENORM_H 46 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/interp.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_INTERP_H 16 | #define LAYER_INTERP_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Interp : public Layer 23 | { 24 | public: 25 | Interp(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat &bottom_blob, Mat &top_blob, const Option& opt) const; 30 | 31 | public: 32 | // param 33 | float width_scale; 34 | float height_scale; 35 | int output_width; 36 | int output_height; 37 | int resize_type;//1:near 2: bilinear 38 | }; 39 | 40 | } // namespace ncnn 41 | 42 | #endif // LAYER_INTERP_H 43 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/log.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_LOG_H 16 | #define LAYER_LOG_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Log : public Layer 23 | { 24 | public: 25 | Log(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float base; 33 | float scale; 34 | float shift; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_LOG_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/lrn.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_LRN_H 16 | #define LAYER_LRN_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class LRN : public Layer 23 | { 24 | public: 25 | LRN(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | enum { NormRegion_ACROSS_CHANNELS = 0, NormRegion_WITHIN_CHANNEL = 1 }; 32 | 33 | public: 34 | // param 35 | int region_type; 36 | int local_size; 37 | float alpha; 38 | float beta; 39 | float bias; 40 | }; 41 | 42 | } // namespace ncnn 43 | 44 | #endif // LAYER_LRN_H 45 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/matmul.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_MATMUL_H 16 | #define LAYER_MATMUL_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class MatMul : public ncnn::Layer 23 | { 24 | public: 25 | MatMul(); 26 | virtual int load_param(const ParamDict& pd); 27 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 28 | }; 29 | 30 | } // ncnn namespace 31 | 32 | #endif // LAYER_MATMUL_H 33 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/memorydata.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_MEMORYDATA_H 16 | #define LAYER_MEMORYDATA_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class MemoryData : public Layer 23 | { 24 | public: 25 | MemoryData(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int load_model(const ModelBin& mb); 30 | 31 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 32 | 33 | public: 34 | int w; 35 | int h; 36 | int c; 37 | 38 | Mat data; 39 | }; 40 | 41 | } // namespace ncnn 42 | 43 | #endif // LAYER_MEMORYDATA_H 44 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/mvn.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_MVN_H 16 | #define LAYER_MVN_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class MVN : public Layer 23 | { 24 | public: 25 | MVN(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int normalize_variance; 33 | int across_channels; 34 | float eps; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_MVN_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/packing.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_PACKING_H 16 | #define LAYER_PACKING_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Packing : public Layer 23 | { 24 | public: 25 | Packing(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | private: 32 | int out_packing; 33 | }; 34 | 35 | } // namespace ncnn 36 | 37 | #endif // LAYER_PACKING_H 38 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/permute.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_PERMUTE_H 16 | #define LAYER_PERMUTE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Permute : public Layer 23 | { 24 | public: 25 | Permute(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int order_type; 33 | }; 34 | 35 | } // namespace ncnn 36 | 37 | #endif // LAYER_PERMUTE_H 38 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/power.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_POWER_H 16 | #define LAYER_POWER_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Power : public Layer 23 | { 24 | public: 25 | Power(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float power; 33 | float scale; 34 | float shift; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_POWER_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/prelu.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_PRELU_H 16 | #define LAYER_PRELU_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class PReLU : public Layer 23 | { 24 | public: 25 | PReLU(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int load_model(const ModelBin& mb); 30 | 31 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 32 | 33 | public: 34 | int num_slope; 35 | Mat slope_data; 36 | }; 37 | 38 | } // namespace ncnn 39 | 40 | #endif // LAYER_PRELU_H 41 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/psroipooling.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_PSROIPOOLING_H 16 | #define LAYER_PSROIPOOLING_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class PSROIPooling : public Layer 23 | { 24 | public: 25 | PSROIPooling(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 30 | 31 | public: 32 | int pooled_width; 33 | int pooled_height; 34 | float spatial_scale; 35 | int output_dim; 36 | }; 37 | 38 | } // namespace ncnn 39 | 40 | #endif // LAYER_PSROIPOOLING_H 41 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/quantize.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_QUANTIZE_H 16 | #define LAYER_QUANTIZE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Quantize : public Layer 23 | { 24 | public: 25 | Quantize(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | float scale; 33 | }; 34 | 35 | } // namespace ncnn 36 | 37 | #endif // LAYER_QUANTIZE_H 38 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/reorg.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_REORG_H 16 | #define LAYER_REORG_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Reorg : public Layer 23 | { 24 | public: 25 | Reorg(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | private: 32 | int stride; 33 | }; 34 | 35 | } // namespace ncnn 36 | 37 | #endif // LAYER_REORG_H 38 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/reshape.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_RESHAPE_H 16 | #define LAYER_RESHAPE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Reshape : public Layer 23 | { 24 | public: 25 | Reshape(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | private: 32 | // reshape flag 33 | // 0 = copy from bottom 34 | // -1 = remaining 35 | // -233 = drop this dim (default) 36 | int w; 37 | int h; 38 | int c; 39 | int permute; 40 | int ndim; 41 | }; 42 | 43 | } // namespace ncnn 44 | 45 | #endif // LAYER_RESHAPE_H 46 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/roialign.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ROIALIGN_H 16 | #define LAYER_ROIALIGN_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ROIAlign : public Layer 23 | { 24 | public: 25 | ROIAlign(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 30 | 31 | public: 32 | int pooled_width; 33 | int pooled_height; 34 | float spatial_scale; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_ROIALIGN_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/roipooling.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ROIPOOLING_H 16 | #define LAYER_ROIPOOLING_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ROIPooling : public Layer 23 | { 24 | public: 25 | ROIPooling(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 30 | 31 | public: 32 | int pooled_width; 33 | int pooled_height; 34 | float spatial_scale; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_ROIPOOLING_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/shufflechannel.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SHUFFLECHANNEL_H 16 | #define LAYER_SHUFFLECHANNEL_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ShuffleChannel : public Layer 23 | { 24 | public: 25 | ShuffleChannel(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int group; 33 | }; 34 | 35 | } // namespace ncnn 36 | 37 | #endif // LAYER_SHUFFLECHANNEL_H 38 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/sigmoid.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SIGMOID_H 16 | #define LAYER_SIGMOID_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Sigmoid : public Layer 23 | { 24 | public: 25 | Sigmoid(); 26 | 27 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 28 | 29 | public: 30 | }; 31 | 32 | } // namespace ncnn 33 | 34 | #endif // LAYER_SIGMOID_H 35 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/slice.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SLICE_H 16 | #define LAYER_SLICE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Slice : public Layer 23 | { 24 | public: 25 | Slice(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 30 | 31 | public: 32 | Mat slices; 33 | int axis; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_SLICE_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/split.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SPLIT_H 16 | #define LAYER_SPLIT_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Split : public Layer 23 | { 24 | public: 25 | Split(); 26 | 27 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 28 | 29 | #if NCNN_VULKAN 30 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, VkCompute& cmd, const Option& opt) const; 31 | #endif // NCNN_VULKAN 32 | 33 | public: 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_SPLIT_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/spp.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SPP_H 16 | #define LAYER_SPP_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class SPP : public Layer 23 | { 24 | public: 25 | SPP(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | enum { PoolMethod_MAX = 0, PoolMethod_AVE = 1 }; 32 | 33 | public: 34 | // param 35 | int pooling_type; 36 | int pyramid_height; 37 | }; 38 | 39 | } // namespace ncnn 40 | 41 | #endif // LAYER_SPP_H 42 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/squeeze.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SQUEEZE_H 16 | #define LAYER_SQUEEZE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Squeeze : public Layer 23 | { 24 | public: 25 | Squeeze(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int squeeze_w; 33 | int squeeze_h; 34 | int squeeze_c; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_SQUEEZE_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/tanh.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_TANH_H 16 | #define LAYER_TANH_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class TanH : public Layer 23 | { 24 | public: 25 | TanH(); 26 | 27 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 28 | 29 | public: 30 | }; 31 | 32 | } // namespace ncnn 33 | 34 | #endif // LAYER_TANH_H 35 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/threshold.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_THRESHOLD_H 16 | #define LAYER_THRESHOLD_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Threshold : public Layer 23 | { 24 | public: 25 | Threshold(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float threshold; 33 | }; 34 | 35 | } // namespace ncnn 36 | 37 | #endif // LAYER_THRESHOLD_H 38 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/tile.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_TILE_H 16 | #define LAYER_TILE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Tile : public Layer 23 | { 24 | public: 25 | Tile(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int dim; 33 | int tiles; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_TILE_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/x86/convolution_x86.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_CONVOLUTION_X86_H 16 | #define LAYER_CONVOLUTION_X86_H 17 | 18 | #include "convolution.h" 19 | 20 | namespace ncnn { 21 | 22 | typedef void (*conv_func)(const Mat&, Mat&, const Mat&, const Mat&, const Option&); 23 | 24 | class Convolution_x86 : public Convolution 25 | { 26 | public: 27 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 28 | virtual int forwardDilation(const Mat& bottom_blob, Mat &top_blob, conv_func conv, const Option& opt) const; 29 | }; 30 | 31 | } // namespace ncnn 32 | 33 | #endif // LAYER_CONVOLUTION_X86_H 34 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer/x86/convolutiondepthwise_x86.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_CONVOLUTIONDEPTHWISE_X86_H 16 | #define LAYER_CONVOLUTIONDEPTHWISE_X86_H 17 | 18 | #include "convolutiondepthwise.h" 19 | 20 | namespace ncnn { 21 | 22 | class ConvolutionDepthWise_x86 : public ConvolutionDepthWise 23 | { 24 | public: 25 | ConvolutionDepthWise_x86(); 26 | virtual ~ConvolutionDepthWise_x86(); 27 | 28 | virtual int load_model(const ModelBin& mb); 29 | 30 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 31 | 32 | public: 33 | std::vector group_ops; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_CONVOLUTIONDEPTHWISE_X86_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer_declaration.h.in: -------------------------------------------------------------------------------- 1 | // Layer Declaration header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | @layer_declaration@ 6 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer_registry.h.in: -------------------------------------------------------------------------------- 1 | // Layer Registry header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | @layer_registry@ 6 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer_shader_registry.h.in: -------------------------------------------------------------------------------- 1 | // Layer Shader Registry header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | @layer_shader_registry@ 6 | 7 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer_shader_spv_data.h.in: -------------------------------------------------------------------------------- 1 | // Layer Shader Spv Data header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | @layer_shader_spv_data@ 6 | 7 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer_type.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_LAYER_TYPE_H 16 | #define NCNN_LAYER_TYPE_H 17 | 18 | namespace ncnn { 19 | 20 | namespace LayerType { 21 | enum 22 | { 23 | #include "layer_type_enum.h" 24 | CustomBit = (1<<8), 25 | }; 26 | } // namespace LayerType 27 | 28 | } // namespace ncnn 29 | 30 | #endif // NCNN_LAYER_TYPE_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer_type_enum.h: -------------------------------------------------------------------------------- 1 | // Layer Type Enum header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | AbsVal = 0, 6 | ArgMax = 1, 7 | BatchNorm = 2, 8 | Bias = 3, 9 | BNLL = 4, 10 | Concat = 5, 11 | Convolution = 6, 12 | Crop = 7, 13 | Deconvolution = 8, 14 | Dropout = 9, 15 | Eltwise = 10, 16 | ELU = 11, 17 | Embed = 12, 18 | Exp = 13, 19 | Flatten = 14, 20 | InnerProduct = 15, 21 | Input = 16, 22 | Log = 17, 23 | LRN = 18, 24 | MemoryData = 19, 25 | MVN = 20, 26 | Pooling = 21, 27 | Power = 22, 28 | PReLU = 23, 29 | Proposal = 24, 30 | Reduction = 25, 31 | ReLU = 26, 32 | Reshape = 27, 33 | ROIPooling = 28, 34 | Scale = 29, 35 | Sigmoid = 30, 36 | Slice = 31, 37 | Softmax = 32, 38 | Split = 33, 39 | SPP = 34, 40 | TanH = 35, 41 | Threshold = 36, 42 | Tile = 37, 43 | RNN = 38, 44 | LSTM = 39, 45 | BinaryOp = 40, 46 | UnaryOp = 41, 47 | ConvolutionDepthWise = 42, 48 | Padding = 43, 49 | Squeeze = 44, 50 | ExpandDims = 45, 51 | Normalize = 46, 52 | Permute = 47, 53 | PriorBox = 48, 54 | DetectionOutput = 49, 55 | Interp = 50, 56 | DeconvolutionDepthWise = 51, 57 | ShuffleChannel = 52, 58 | InstanceNorm = 53, 59 | Clip = 54, 60 | Reorg = 55, 61 | YoloDetectionOutput = 56, 62 | Quantize = 57, 63 | Dequantize = 58, 64 | Yolov3DetectionOutput = 59, 65 | PSROIPooling = 60, 66 | ROIAlign = 61, 67 | Packing = 62, 68 | MatMul = 63, 69 | 70 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/layer_type_enum.h.in: -------------------------------------------------------------------------------- 1 | // Layer Type Enum header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | @layer_type_enum@ 6 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/platform.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_PLATFORM_H 16 | #define NCNN_PLATFORM_H 17 | 18 | #define NCNN_STDIO 1 19 | #define NCNN_STRING 1 20 | #define NCNN_OPENCV 0 21 | #define NCNN_BENCHMARK 0 22 | #define NCNN_PIXEL 1 23 | #define NCNN_PIXEL_ROTATE 0 24 | #define NCNN_VULKAN 0 25 | 26 | #endif // NCNN_PLATFORM_H 27 | -------------------------------------------------------------------------------- /NcnnSrcDemo/src/platform.h.in: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_PLATFORM_H 16 | #define NCNN_PLATFORM_H 17 | 18 | #cmakedefine01 NCNN_STDIO 19 | #cmakedefine01 NCNN_STRING 20 | #cmakedefine01 NCNN_OPENCV 21 | #cmakedefine01 NCNN_BENCHMARK 22 | #cmakedefine01 NCNN_PIXEL 23 | #cmakedefine01 NCNN_PIXEL_ROTATE 24 | #cmakedefine01 NCNN_VULKAN 25 | 26 | #endif // NCNN_PLATFORM_H 27 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/NcnnSrcDemo_MoltenVK/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // NcnnSrcDemo_MoltenVK 4 | // 5 | // Created by Chris on 2019/4/4. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/NcnnSrcDemo_MoltenVK/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/NcnnSrcDemo_MoltenVK/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // NcnnSrcDemo_MoltenVK 4 | // 5 | // Created by Chris on 2019/4/4. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/NcnnSrcDemo_MoltenVK/ViewController.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // NcnnSrcDemo_MoltenVK 4 | // 5 | // Created by Chris on 2019/4/4. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import "TestSupport.h" 10 | #import "ViewController.h" 11 | 12 | #define __USE_VULKAN 1 13 | 14 | @interface ViewController () { 15 | ncnn::Net ncnn_net; 16 | } 17 | 18 | @end 19 | 20 | @implementation ViewController 21 | 22 | - (void)dealloc { 23 | #if __USE_VULKAN 24 | ncnn::destroy_gpu_instance(); 25 | #endif 26 | } 27 | 28 | - (void)viewDidLoad { 29 | [super viewDidLoad]; 30 | #if __USE_VULKAN 31 | ncnn::create_gpu_instance(); 32 | ncnn_net.use_vulkan_compute = 1; 33 | #endif 34 | 35 | ts_load_model(ncnn_net); 36 | [self detect]; 37 | } 38 | 39 | #pragma mark - 40 | 41 | - (void)detect { 42 | 43 | /* 提取输出 */ 44 | ncnn::Mat mat_dst; 45 | ts_detect(mat_dst, ncnn_net); 46 | 47 | /* 输出规范化 */ 48 | NSArray *rstArray = ts_mat2array(mat_dst); 49 | NSArray *top5Array = ts_topN(rstArray, 5); 50 | 51 | /* 打印输出 */ 52 | NSLog(@"%@", top5Array); 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/NcnnSrcDemo_MoltenVK/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NcnnSrcDemo_MoltenVK 4 | // 5 | // Created by Chris on 2019/4/4. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.13 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/yangyifan/Documents/workingcopys/Ncnn") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/yangyifan/Documents/workingcopys/Ncnn/build-ios") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/generate-spirv.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | ) 4 | # The set of files for implicit dependencies of each language: 5 | 6 | # Targets to which this target links. 7 | set(CMAKE_TARGET_LINKED_INFO_FILES 8 | ) 9 | 10 | # Fortran module output directory. 11 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 12 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/generate-spirv.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.13 3 | 4 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/generate-spirv.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.13 3 | 4 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/allocator.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/allocator.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/benchmark.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/benchmark.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/blob.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/blob.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/cmake_clean_target.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "libncnn.a" 3 | ) 4 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/command.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/command.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/cpu.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/cpu.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.13 3 | 4 | # compile CXX with /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ 5 | CXX_FLAGS = -miphoneos-version-min=8.0 -fvisibility=hidden -fvisibility-inlines-hidden -fobjc-abi-version=2 -fobjc-arc -miphoneos-version-min=8.0 -fvisibility=hidden -fvisibility-inlines-hidden -fobjc-abi-version=2 -fobjc-arc -fno-rtti -fno-exceptions -miphoneos-version-min=8.0 -fvisibility=hidden -fvisibility-inlines-hidden -fobjc-abi-version=2 -fobjc-arc -miphoneos-version-min=8.0 -fvisibility=hidden -fvisibility-inlines-hidden -fobjc-abi-version=2 -fobjc-arc -DNDEBUG -O3 -ffast-math -miphoneos-version-min=8.0 -fvisibility=hidden -fvisibility-inlines-hidden -fobjc-abi-version=2 -fobjc-arc -DNDEBUG -O3 -ffast-math -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -Wall -Wextra -Wno-unused-function -fPIC -Ofast -ffast-math -fvisibility=hidden -fvisibility-inlines-hidden 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/Users/yangyifan/Documents/Software/vulkansdk/vulkansdk-macos-1.1.92.1/MoltenVK/include -I/Users/yangyifan/Documents/workingcopys/Ncnn/src -I/Users/yangyifan/Documents/workingcopys/Ncnn/build-ios/src -I/Users/yangyifan/Documents/workingcopys/Ncnn/src/layer 10 | 11 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/gpu.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/gpu.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/absval.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/absval.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/absval_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/absval_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/batchnorm_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/batchnorm_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/bias_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/bias_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/clip_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/clip_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/convolution_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/convolution_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/convolutiondepthwise_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/convolutiondepthwise_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/deconvolution_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/deconvolution_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/deconvolutiondepthwise_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/deconvolutiondepthwise_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/dequantize_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/dequantize_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/eltwise_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/eltwise_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/innerproduct_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/innerproduct_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/interp_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/interp_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/lrn_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/lrn_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/pooling_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/pooling_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/prelu_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/prelu_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/quantize_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/quantize_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/relu_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/relu_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/requantize_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/requantize_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/scale_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/scale_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/sigmoid_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/sigmoid_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/softmax_arm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/arm/softmax_arm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/batchnorm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/batchnorm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/bias.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/bias.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/binaryop.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/binaryop.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/bnll.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/bnll.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/cast.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/cast.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/clip.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/clip.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/concat.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/concat.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/convolution.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/convolution.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/convolutiondepthwise.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/convolutiondepthwise.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/crop.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/crop.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/deconvolution.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/deconvolution.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/deconvolutiondepthwise.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/deconvolutiondepthwise.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/dequantize.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/dequantize.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/detectionoutput.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/detectionoutput.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/dropout.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/dropout.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/eltwise.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/eltwise.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/elu.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/elu.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/embed.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/embed.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/exp.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/exp.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/expanddims.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/expanddims.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/flatten.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/flatten.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/innerproduct.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/innerproduct.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/input.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/input.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/instancenorm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/instancenorm.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/interp.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/interp.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/log.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/log.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/lrn.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/lrn.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/matmul.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/matmul.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/memorydata.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/memorydata.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/mvn.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/mvn.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/normalize.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/normalize.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/packing.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/packing.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/padding.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/padding.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/permute.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/permute.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/pooling.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/pooling.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/power.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/power.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/prelu.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/prelu.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/priorbox.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/priorbox.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/proposal.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/proposal.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/psroipooling.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/psroipooling.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/quantize.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/quantize.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/reduction.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/reduction.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/relu.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/relu.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/reorg.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/reorg.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/requantize.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/requantize.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/reshape.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/reshape.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/roipooling.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/roipooling.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/scale.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/scale.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/shufflechannel.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/shufflechannel.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/sigmoid.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/sigmoid.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/slice.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/slice.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/softmax.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/softmax.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/split.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/split.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/squeeze.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/squeeze.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/tanh.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/tanh.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/threshold.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/threshold.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/unaryop.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/unaryop.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/yolodetectionoutput.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/yolodetectionoutput.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/yolov3detectionoutput.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/layer/yolov3detectionoutput.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/mat.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/mat.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/mat_pixel.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/mat_pixel.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/mat_pixel_resize.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/mat_pixel_resize.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/modelbin.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/modelbin.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/net.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/net.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/opencv.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/opencv.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/paramdict.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/paramdict.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/pipeline.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/ncnn.dir/pipeline.cpp.o -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 100 2 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/layer_type_enum.h: -------------------------------------------------------------------------------- 1 | // Layer Type Enum header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | AbsVal = 0, 6 | ArgMax = 1, 7 | BatchNorm = 2, 8 | Bias = 3, 9 | BNLL = 4, 10 | Concat = 5, 11 | Convolution = 6, 12 | Crop = 7, 13 | Deconvolution = 8, 14 | Dropout = 9, 15 | Eltwise = 10, 16 | ELU = 11, 17 | Embed = 12, 18 | Exp = 13, 19 | Flatten = 14, 20 | InnerProduct = 15, 21 | Input = 16, 22 | Log = 17, 23 | LRN = 18, 24 | MemoryData = 19, 25 | MVN = 20, 26 | Pooling = 21, 27 | Power = 22, 28 | PReLU = 23, 29 | Proposal = 24, 30 | Reduction = 25, 31 | ReLU = 26, 32 | Reshape = 27, 33 | ROIPooling = 28, 34 | Scale = 29, 35 | Sigmoid = 30, 36 | Slice = 31, 37 | Softmax = 32, 38 | Split = 33, 39 | SPP = 34, 40 | TanH = 35, 41 | Threshold = 36, 42 | Tile = 37, 43 | RNN = 38, 44 | LSTM = 39, 45 | BinaryOp = 40, 46 | UnaryOp = 41, 47 | ConvolutionDepthWise = 42, 48 | Padding = 43, 49 | Squeeze = 44, 50 | ExpandDims = 45, 51 | Normalize = 46, 52 | Permute = 47, 53 | PriorBox = 48, 54 | DetectionOutput = 49, 55 | Interp = 50, 56 | DeconvolutionDepthWise = 51, 57 | ShuffleChannel = 52, 58 | InstanceNorm = 53, 59 | Clip = 54, 60 | Reorg = 55, 61 | YoloDetectionOutput = 56, 62 | Quantize = 57, 63 | Dequantize = 58, 64 | Yolov3DetectionOutput = 59, 65 | PSROIPooling = 60, 66 | ROIAlign = 61, 67 | Packing = 62, 68 | MatMul = 63, 69 | Requantize = 64, 70 | Cast = 65, 71 | 72 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/libncnn.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/NcnnSrcDemo_MoltenVK/build_headers/libncnn.a -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/build_headers/platform.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_PLATFORM_H 16 | #define NCNN_PLATFORM_H 17 | 18 | #define NCNN_STDIO 1 19 | #define NCNN_STRING 1 20 | #define NCNN_OPENCV 0 21 | #define NCNN_BENCHMARK 0 22 | #define NCNN_PIXEL 1 23 | #define NCNN_PIXEL_ROTATE 0 24 | #define NCNN_VULKAN 1 25 | #define NCNN_REQUANT 0 26 | #define NCNN_IM2COL_SGEMM 0 27 | 28 | #endif // NCNN_PLATFORM_H 29 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/benchmark.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_BENCHMARK_H 16 | #define NCNN_BENCHMARK_H 17 | 18 | #include "platform.h" 19 | #include "mat.h" 20 | #include "layer.h" 21 | 22 | namespace ncnn { 23 | 24 | // get now timestamp in ms 25 | double get_current_time(); 26 | 27 | #if NCNN_BENCHMARK 28 | 29 | void benchmark(const Layer* layer, double start, double end); 30 | void benchmark(const Layer* layer, const Mat& bottom_blob, Mat& top_blob, double start, double end); 31 | 32 | #endif // NCNN_BENCHMARK 33 | 34 | } // namespace ncnn 35 | 36 | #endif // NCNN_BENCHMARK_H 37 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/blob.cpp: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #include "blob.h" 16 | 17 | namespace ncnn { 18 | 19 | Blob::Blob() 20 | { 21 | producer = -1; 22 | } 23 | 24 | } // namespace ncnn 25 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/blob.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_BLOB_H 16 | #define NCNN_BLOB_H 17 | 18 | #include 19 | #include 20 | #include "platform.h" 21 | 22 | namespace ncnn { 23 | 24 | class Blob 25 | { 26 | public: 27 | // empty 28 | Blob(); 29 | 30 | public: 31 | #if NCNN_STRING 32 | // blob name 33 | std::string name; 34 | #endif // NCNN_STRING 35 | // layer index which produce this blob as output 36 | int producer; 37 | // layer index which need this blob as input 38 | std::vector consumers; 39 | }; 40 | 41 | } // namespace ncnn 42 | 43 | #endif // NCNN_BLOB_H 44 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/argmax.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ARGMAX_H 16 | #define LAYER_ARGMAX_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ArgMax : public Layer 23 | { 24 | public: 25 | ArgMax(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int out_max_val; 33 | int topk; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_ARGMAX_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/absval_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ABSVAL_ARM_H 16 | #define LAYER_ABSVAL_ARM_H 17 | 18 | #include "absval.h" 19 | 20 | namespace ncnn { 21 | 22 | class AbsVal_arm : public AbsVal 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_ABSVAL_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/batchnorm_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_BATCHNORM_ARM_H 16 | #define LAYER_BATCHNORM_ARM_H 17 | 18 | #include "batchnorm.h" 19 | 20 | namespace ncnn { 21 | 22 | class BatchNorm_arm : public BatchNorm 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_BATCHNORM_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/bias_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_BIAS_ARM_H 16 | #define LAYER_BIAS_ARM_H 17 | 18 | #include "bias.h" 19 | 20 | namespace ncnn { 21 | 22 | class Bias_arm : public Bias 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_BIAS_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/clip_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_CLIP_ARM_H 16 | #define LAYER_CLIP_ARM_H 17 | 18 | #include "clip.h" 19 | 20 | namespace ncnn { 21 | 22 | class Clip_arm : public Clip 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_CLIP_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/convolutiondepthwise_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_CONVOLUTIONDEPTHWISE_ARM_H 16 | #define LAYER_CONVOLUTIONDEPTHWISE_ARM_H 17 | 18 | #include "convolutiondepthwise.h" 19 | 20 | namespace ncnn { 21 | 22 | class ConvolutionDepthWise_arm : public ConvolutionDepthWise 23 | { 24 | public: 25 | ConvolutionDepthWise_arm(); 26 | virtual ~ConvolutionDepthWise_arm(); 27 | 28 | virtual int load_model(const ModelBin& mb); 29 | 30 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 31 | 32 | public: 33 | std::vector group_ops; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_CONVOLUTIONDEPTHWISE_ARM_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/deconvolution_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_DECONVOLUTION_ARM_H 16 | #define LAYER_DECONVOLUTION_ARM_H 17 | 18 | #include "deconvolution.h" 19 | 20 | namespace ncnn { 21 | 22 | class Deconvolution_arm : public Deconvolution 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_DECONVOLUTION_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/deconvolutiondepthwise_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_DECONVOLUTIONDEPTHWISE_ARM_H 16 | #define LAYER_DECONVOLUTIONDEPTHWISE_ARM_H 17 | 18 | #include "deconvolutiondepthwise.h" 19 | 20 | namespace ncnn { 21 | 22 | class DeconvolutionDepthWise_arm : public DeconvolutionDepthWise 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_DECONVOLUTIONDEPTHWISE_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/dequantize_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_DEQUANTIZE_ARM_H 16 | #define LAYER_DEQUANTIZE_ARM_H 17 | 18 | #include "dequantize.h" 19 | 20 | namespace ncnn { 21 | 22 | class Dequantize_arm : public Dequantize 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_DEQUANTIZE_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/eltwise_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ELTWISE_ARM_H 16 | #define LAYER_ELTWISE_ARM_H 17 | 18 | #include "eltwise.h" 19 | 20 | namespace ncnn { 21 | 22 | class Eltwise_arm : public Eltwise 23 | { 24 | public: 25 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_ELTWISE_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/innerproduct_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_INNERPRODUCT_ARM_H 16 | #define LAYER_INNERPRODUCT_ARM_H 17 | 18 | #include "innerproduct.h" 19 | 20 | namespace ncnn { 21 | 22 | class InnerProduct_arm : public InnerProduct 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_INNERPRODUCT_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/interp_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_INTERP_ARM_H 16 | #define LAYER_INTERP_ARM_H 17 | 18 | #include "interp.h" 19 | 20 | namespace ncnn { 21 | 22 | class Interp_arm : public Interp 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_INTERP_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/lrn_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_LRN_ARM_H 16 | #define LAYER_LRN_ARM_H 17 | 18 | #include "lrn.h" 19 | 20 | namespace ncnn { 21 | 22 | class LRN_arm : public LRN 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_LRN_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/pooling_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_POOLING_ARM_H 16 | #define LAYER_POOLING_ARM_H 17 | 18 | #include "pooling.h" 19 | 20 | namespace ncnn { 21 | 22 | class Pooling_arm : public Pooling 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_POOLING_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/prelu_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_PRELU_ARM_H 16 | #define LAYER_PRELU_ARM_H 17 | 18 | #include "prelu.h" 19 | 20 | namespace ncnn { 21 | 22 | class PReLU_arm : public PReLU 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_PRELU_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/quantize_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_QUANTIZE_ARM_H 16 | #define LAYER_QUANTIZE_ARM_H 17 | 18 | #include "quantize.h" 19 | 20 | namespace ncnn { 21 | 22 | class Quantize_arm : public Quantize 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_QUANTIZE_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/relu_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_RELU_ARM_H 16 | #define LAYER_RELU_ARM_H 17 | 18 | #include "relu.h" 19 | 20 | namespace ncnn { 21 | 22 | class ReLU_arm : public ReLU 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | virtual int forward_inplace_int8(Mat& bottom_top_blob, const Option& opt) const; 27 | }; 28 | 29 | } // namespace ncnn 30 | 31 | #endif // LAYER_RELU_ARM_H 32 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/requantize_arm.h: -------------------------------------------------------------------------------- 1 | // BUG1989 is pleased to support the open source community by supporting ncnn available. 2 | // 3 | // Copyright (C) 2019 BUG1989. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_REQUANTIZE_ARM_H 16 | #define LAYER_REQUANTIZE_ARM_H 17 | 18 | #include "requantize.h" 19 | 20 | namespace ncnn { 21 | 22 | class Requantize_arm : public Requantize 23 | { 24 | public: 25 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_REQUANTIZE_ARM_H -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/scale_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SCALE_ARM_H 16 | #define LAYER_SCALE_ARM_H 17 | 18 | #include "scale.h" 19 | 20 | namespace ncnn { 21 | 22 | class Scale_arm : public Scale 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_SCALE_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/sigmoid_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SIGMOID_ARM_H 16 | #define LAYER_SIGMOID_ARM_H 17 | 18 | #include "sigmoid.h" 19 | 20 | namespace ncnn { 21 | 22 | class Sigmoid_arm : public Sigmoid 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_SIGMOID_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/arm/softmax_arm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SOFTMAX_ARM_H 16 | #define LAYER_SOFTMAX_ARM_H 17 | 18 | #include "softmax.h" 19 | 20 | namespace ncnn { 21 | 22 | class Softmax_arm : public Softmax 23 | { 24 | public: 25 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 26 | }; 27 | 28 | } // namespace ncnn 29 | 30 | #endif // LAYER_SOFTMAX_ARM_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/bias.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_BIAS_H 16 | #define LAYER_BIAS_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Bias : public Layer 23 | { 24 | public: 25 | Bias(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int load_model(const ModelBin& mb); 30 | 31 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 32 | 33 | public: 34 | // param 35 | int bias_data_size; 36 | 37 | // model 38 | Mat bias_data; 39 | }; 40 | 41 | } // namespace ncnn 42 | 43 | #endif // LAYER_BIAS_H 44 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/bnll.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_BNLL_H 16 | #define LAYER_BNLL_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class BNLL : public Layer 23 | { 24 | public: 25 | BNLL(); 26 | 27 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 28 | 29 | public: 30 | }; 31 | 32 | } // namespace ncnn 33 | 34 | #endif // LAYER_BNLL_H 35 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/dequantize.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_DEQUANTIZE_H 16 | #define LAYER_DEQUANTIZE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Dequantize : public Layer 23 | { 24 | public: 25 | Dequantize(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int load_model(const ModelBin& mb); 30 | 31 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 32 | 33 | public: 34 | float scale; 35 | int bias_term; 36 | int bias_data_size; 37 | 38 | Mat bias_data; 39 | }; 40 | 41 | } // namespace ncnn 42 | 43 | #endif // LAYER_DEQUANTIZE_H 44 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/elu.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ELU_H 16 | #define LAYER_ELU_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ELU : public Layer 23 | { 24 | public: 25 | ELU(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float alpha; 33 | }; 34 | 35 | } // namespace ncnn 36 | 37 | #endif // LAYER_ELU_H 38 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/exp.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_EXP_H 16 | #define LAYER_EXP_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Exp : public Layer 23 | { 24 | public: 25 | Exp(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float base; 33 | float scale; 34 | float shift; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_EXP_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/expanddims.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_EXPANDDIMS_H 16 | #define LAYER_EXPANDDIMS_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ExpandDims : public Layer 23 | { 24 | public: 25 | ExpandDims(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int expand_w; 33 | int expand_h; 34 | int expand_c; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_EXPANDDIMS_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/input.cpp: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #include "input.h" 16 | 17 | namespace ncnn { 18 | 19 | DEFINE_LAYER_CREATOR(Input) 20 | 21 | Input::Input() 22 | { 23 | one_blob_only = true; 24 | support_inplace = true; 25 | support_vulkan = false; 26 | } 27 | 28 | int Input::load_param(const ParamDict& pd) 29 | { 30 | w = pd.get(0, 0); 31 | h = pd.get(1, 0); 32 | c = pd.get(2, 0); 33 | 34 | return 0; 35 | } 36 | 37 | int Input::forward_inplace(Mat& /*bottom_top_blob*/, const Option& /*opt*/) const 38 | { 39 | return 0; 40 | } 41 | 42 | } // namespace ncnn 43 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/input.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_INPUT_H 16 | #define LAYER_INPUT_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Input : public Layer 23 | { 24 | public: 25 | Input(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | int w; 33 | int h; 34 | int c; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_INPUT_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/instancenorm.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_INSTANCENORM_H 16 | #define LAYER_INSTANCENORM_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class InstanceNorm : public Layer 23 | { 24 | public: 25 | InstanceNorm(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int load_model(const ModelBin& mb); 30 | 31 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 32 | 33 | public: 34 | // param 35 | int channels; 36 | float eps; 37 | 38 | // model 39 | Mat gamma_data; 40 | Mat beta_data; 41 | }; 42 | 43 | } // namespace ncnn 44 | 45 | #endif // LAYER_INSTANCENORM_H 46 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/log.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_LOG_H 16 | #define LAYER_LOG_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Log : public Layer 23 | { 24 | public: 25 | Log(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float base; 33 | float scale; 34 | float shift; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_LOG_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/matmul.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_MATMUL_H 16 | #define LAYER_MATMUL_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class MatMul : public ncnn::Layer 23 | { 24 | public: 25 | MatMul(); 26 | virtual int load_param(const ParamDict& pd); 27 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 28 | }; 29 | 30 | } // ncnn namespace 31 | 32 | #endif // LAYER_MATMUL_H 33 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/memorydata.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_MEMORYDATA_H 16 | #define LAYER_MEMORYDATA_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class MemoryData : public Layer 23 | { 24 | public: 25 | MemoryData(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int load_model(const ModelBin& mb); 30 | 31 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 32 | 33 | public: 34 | int w; 35 | int h; 36 | int c; 37 | 38 | Mat data; 39 | }; 40 | 41 | } // namespace ncnn 42 | 43 | #endif // LAYER_MEMORYDATA_H 44 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/mvn.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_MVN_H 16 | #define LAYER_MVN_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class MVN : public Layer 23 | { 24 | public: 25 | MVN(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int normalize_variance; 33 | int across_channels; 34 | float eps; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_MVN_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/power.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_POWER_H 16 | #define LAYER_POWER_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Power : public Layer 23 | { 24 | public: 25 | Power(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float power; 33 | float scale; 34 | float shift; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_POWER_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/psroipooling.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_PSROIPOOLING_H 16 | #define LAYER_PSROIPOOLING_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class PSROIPooling : public Layer 23 | { 24 | public: 25 | PSROIPooling(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 30 | 31 | public: 32 | int pooled_width; 33 | int pooled_height; 34 | float spatial_scale; 35 | int output_dim; 36 | }; 37 | 38 | } // namespace ncnn 39 | 40 | #endif // LAYER_PSROIPOOLING_H 41 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/quantize.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_QUANTIZE_H 16 | #define LAYER_QUANTIZE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Quantize : public Layer 23 | { 24 | public: 25 | Quantize(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | float scale; 33 | }; 34 | 35 | } // namespace ncnn 36 | 37 | #endif // LAYER_QUANTIZE_H 38 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/roialign.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ROIALIGN_H 16 | #define LAYER_ROIALIGN_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ROIAlign : public Layer 23 | { 24 | public: 25 | ROIAlign(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 30 | 31 | public: 32 | int pooled_width; 33 | int pooled_height; 34 | float spatial_scale; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_ROIALIGN_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/roipooling.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_ROIPOOLING_H 16 | #define LAYER_ROIPOOLING_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class ROIPooling : public Layer 23 | { 24 | public: 25 | ROIPooling(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 30 | 31 | public: 32 | int pooled_width; 33 | int pooled_height; 34 | float spatial_scale; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_ROIPOOLING_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/slice.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SLICE_H 16 | #define LAYER_SLICE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Slice : public Layer 23 | { 24 | public: 25 | Slice(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 30 | 31 | public: 32 | Mat slices; 33 | int axis; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_SLICE_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/split.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SPLIT_H 16 | #define LAYER_SPLIT_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Split : public Layer 23 | { 24 | public: 25 | Split(); 26 | 27 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 28 | 29 | #if NCNN_VULKAN 30 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, VkCompute& cmd, const Option& opt) const; 31 | #endif // NCNN_VULKAN 32 | 33 | public: 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_SPLIT_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/spp.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SPP_H 16 | #define LAYER_SPP_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class SPP : public Layer 23 | { 24 | public: 25 | SPP(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | enum { PoolMethod_MAX = 0, PoolMethod_AVE = 1 }; 32 | 33 | public: 34 | // param 35 | int pooling_type; 36 | int pyramid_height; 37 | }; 38 | 39 | } // namespace ncnn 40 | 41 | #endif // LAYER_SPP_H 42 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/squeeze.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_SQUEEZE_H 16 | #define LAYER_SQUEEZE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Squeeze : public Layer 23 | { 24 | public: 25 | Squeeze(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int squeeze_w; 33 | int squeeze_h; 34 | int squeeze_c; 35 | }; 36 | 37 | } // namespace ncnn 38 | 39 | #endif // LAYER_SQUEEZE_H 40 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/threshold.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_THRESHOLD_H 16 | #define LAYER_THRESHOLD_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Threshold : public Layer 23 | { 24 | public: 25 | Threshold(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 30 | 31 | public: 32 | float threshold; 33 | }; 34 | 35 | } // namespace ncnn 36 | 37 | #endif // LAYER_THRESHOLD_H 38 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/tile.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_TILE_H 16 | #define LAYER_TILE_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class Tile : public Layer 23 | { 24 | public: 25 | Tile(); 26 | 27 | virtual int load_param(const ParamDict& pd); 28 | 29 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 30 | 31 | public: 32 | int dim; 33 | int tiles; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_TILE_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer/x86/convolutiondepthwise_x86.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_CONVOLUTIONDEPTHWISE_X86_H 16 | #define LAYER_CONVOLUTIONDEPTHWISE_X86_H 17 | 18 | #include "convolutiondepthwise.h" 19 | 20 | namespace ncnn { 21 | 22 | class ConvolutionDepthWise_x86 : public ConvolutionDepthWise 23 | { 24 | public: 25 | ConvolutionDepthWise_x86(); 26 | virtual ~ConvolutionDepthWise_x86(); 27 | 28 | virtual int load_model(const ModelBin& mb); 29 | 30 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 31 | 32 | public: 33 | std::vector group_ops; 34 | }; 35 | 36 | } // namespace ncnn 37 | 38 | #endif // LAYER_CONVOLUTIONDEPTHWISE_X86_H 39 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer_declaration.h.in: -------------------------------------------------------------------------------- 1 | // Layer Declaration header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | @layer_declaration@ 6 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer_registry.h.in: -------------------------------------------------------------------------------- 1 | // Layer Registry header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | @layer_registry@ 6 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer_shader_registry.h.in: -------------------------------------------------------------------------------- 1 | // Layer Shader Registry header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | @layer_shader_registry@ 6 | 7 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer_shader_spv_data.h.in: -------------------------------------------------------------------------------- 1 | // Layer Shader Spv Data header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | @layer_shader_spv_data@ 6 | 7 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer_type.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_LAYER_TYPE_H 16 | #define NCNN_LAYER_TYPE_H 17 | 18 | namespace ncnn { 19 | 20 | namespace LayerType { 21 | enum 22 | { 23 | #include "layer_type_enum.h" 24 | CustomBit = (1<<8), 25 | }; 26 | } // namespace LayerType 27 | 28 | } // namespace ncnn 29 | 30 | #endif // NCNN_LAYER_TYPE_H 31 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/layer_type_enum.h.in: -------------------------------------------------------------------------------- 1 | // Layer Type Enum header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | @layer_type_enum@ 6 | -------------------------------------------------------------------------------- /NcnnSrcDemo_MoltenVK/src/platform.h.in: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_PLATFORM_H 16 | #define NCNN_PLATFORM_H 17 | 18 | #cmakedefine01 NCNN_STDIO 19 | #cmakedefine01 NCNN_STRING 20 | #cmakedefine01 NCNN_OPENCV 21 | #cmakedefine01 NCNN_BENCHMARK 22 | #cmakedefine01 NCNN_PIXEL 23 | #cmakedefine01 NCNN_PIXEL_ROTATE 24 | #cmakedefine01 NCNN_VULKAN 25 | #cmakedefine01 NCNN_REQUANT 26 | #cmakedefine01 NCNN_IM2COL_SGEMM 27 | 28 | #endif // NCNN_PLATFORM_H 29 | -------------------------------------------------------------------------------- /testSupport/TestSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestSupport.h 3 | // NcnnSrcDemo_MoltenVK 4 | // 5 | // Created by Chris on 2019/4/4. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #ifndef TestSupport_hpp 10 | #define TestSupport_hpp 11 | 12 | #include 13 | #ifdef NSD_SOURCE 14 | #import "net.h" 15 | #import "mat.h" 16 | #else 17 | #import 18 | #import 19 | #endif 20 | 21 | #endif /* TestSupport_hpp */ 22 | 23 | /* 加载对象检测模型 */ 24 | void ts_load_model(ncnn::Net &inputNet); 25 | 26 | /* 将UIImage转化成Mat */ 27 | void ts_image2mat(ncnn::Mat &outMat, UIImage *inputImage); 28 | 29 | /* 对默认图片进行对象检测,并输出检测结果(ncnn::Mat) */ 30 | void ts_detect(ncnn::Mat &outputMat, ncnn::Net &inputNet); 31 | 32 | /* 打印ncnn::Mat信息 */ 33 | void ts_print_mat(ncnn::Mat &inputMat); 34 | 35 | /* 将ncnn::Mat 转化为 NSArray */ 36 | NSArray * ts_mat2array(ncnn::Mat &inputMat); 37 | 38 | /* 去 value 最大的 n 个 arrayItem */ 39 | NSArray * ts_topN(NSArray *inputArray, int n); 40 | 41 | -------------------------------------------------------------------------------- /testSupport/Test_LoadModelData.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_LoadModelData.h 3 | // NcnnSrcDemo 4 | // 5 | // Created by Chris on 2019/4/8. 6 | // Copyright © 2019 Chris. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | void ts_loadBinFile(NSString *binFilePath); 12 | -------------------------------------------------------------------------------- /testSupport/mouth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/testSupport/mouth.png -------------------------------------------------------------------------------- /testSupport/squeezenet_v1.1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisYooh/ncnnSrcDemo/7863295e0899429110a45fed6e411b1357f40ad7/testSupport/squeezenet_v1.1.bin --------------------------------------------------------------------------------