Skip to content
Snippets Groups Projects
Commit ba04e570 authored by Hashim Sharif's avatar Hashim Sharif
Browse files

Fixing SampSimulation - skipping varying input channels

parent e98fdb81
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,7 @@ void testLenetTanh(){
// conv_mode, conv_precision, 2, 2, 1);
void* conv1out = tensorConvSampSim(input, conv1_filter, 2, 2, 1, 1,
conv_mode, conv_precision, 2, 1);
conv_mode, conv_precision, 4, 0);
// NOTE: For tensorAdd, the only dimension that MUST match is channels
tensorAdd(conv1out, conv1_bias); // NOTE: In place operation
......@@ -107,8 +107,12 @@ void testLenetTanh(){
void* conv1_tanh = tensorTanh(pool1out);
// NOTE: input channels have to match between tensor op inputs and outputs
void* conv2out = tensorConvPerfCuda(conv1_tanh, conv2_filter, 2, 2, 1, 1,
conv_mode, conv_precision, 1, 2, 1);
//void* conv2out = tensorConvPerfCuda(conv1_tanh, conv2_filter, 2, 2, 1, 1,
// conv_mode, conv_precision, 1, 2, 1);
void* conv2out = tensorConvSampSim(conv1_tanh, conv2_filter, 2, 2, 1, 1,
conv_mode, conv_precision, 2, 0);
tensorAdd(conv2out, conv2_bias); // NOTE: In place operation
void* pool2out = tensorPooling(conv2out, 0, 2, 2, 0, 0, 2, 2);
......
......@@ -238,7 +238,8 @@ void sampleFilterElems(int N,
int ch = (i % (c * h * w)) / (h * w);
int n = i / (c * h * w);
int local_index = row * w + col;
//int local_index = row * w + col;
int local_index = (ch * (h * w)) + (row * w) + col;
//data[n * (c * h * w) + ch * (h * w) + row * (w) + col] = 1.0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment