opencv viz

This commit is contained in:
Francesco Gatti
2017-08-10 16:22:17 +02:00
parent b75fa637cb
commit 266330009c
31 changed files with 211 additions and 152 deletions
+3 -3
View File
@@ -7,12 +7,12 @@
x > 0 : y = x
*/
__global__
void activation_elu(value_type *input, value_type *output, int size) {
void activation_elu(dnnType *input, dnnType *output, int size) {
int i = blockDim.x*blockIdx.x + threadIdx.x;
if(i<size) {
value_type k0, k1;
dnnType k0, k1;
if (input[i]>0)
k0 = 1.0f;
@@ -28,7 +28,7 @@ void activation_elu(value_type *input, value_type *output, int size) {
/**
ELU activation function
*/
void activationELUForward(value_type* srcData, value_type* dstData, int size)
void activationELUForward(dnnType* srcData, dnnType* dstData, int size)
{
int blocks = (size+255)/256;
int threads = 256;
+2 -2
View File
@@ -1,7 +1,7 @@
#include "kernels.h"
__global__
void activation_leaky(value_type *input, value_type *output, int size) {
void activation_leaky(dnnType *input, dnnType *output, int size) {
int i = blockDim.x*blockIdx.x + threadIdx.x;
@@ -17,7 +17,7 @@ void activation_leaky(value_type *input, value_type *output, int size) {
/**
ELU activation function
*/
void activationLEAKYForward(value_type* srcData, value_type* dstData, int size)
void activationLEAKYForward(dnnType* srcData, dnnType* dstData, int size)
{
int blocks = (size+255)/256;
int threads = 256;
+2 -2
View File
@@ -1,7 +1,7 @@
#include "kernels.h"
__global__
void activation_logistic(value_type *input, value_type *output, int size) {
void activation_logistic(dnnType *input, dnnType *output, int size) {
int i = blockDim.x*blockIdx.x + threadIdx.x;
@@ -14,7 +14,7 @@ void activation_logistic(value_type *input, value_type *output, int size) {
/**
LOGISTIC activation function
*/
void activationLOGISTICForward(value_type* srcData, value_type* dstData, int size)
void activationLOGISTICForward(dnnType* srcData, dnnType* dstData, int size)
{
int blocks = (size+255)/256;
int threads = 256;
+1 -1
View File
@@ -35,7 +35,7 @@ __global__ void reorg_kernel(int N, float *x, int w, int h, int c, int batch, in
/**
reorg function function
*/
void reorgForward(value_type* srcData, value_type* dstData,
void reorgForward(dnnType* srcData, dnnType* dstData,
int n, int c, int h, int w, int stride) {
int size = n*c*h*w;