Skip to content

Commit 9ef49eb

Browse files
Rectified low rank depthwise conv
1 parent 392cf2e commit 9ef49eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

c_reference/src/conv1d.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ int Conv1D_LR(float *output_signal, unsigned out_T, unsigned out_channels, const
1313
if(padding == -1){
1414
padding = kernel_size >> 1;
1515
}
16+
1617
float* tempW = (float*)malloc(out_channels * in_channels * kernel_size * sizeof(float)) ;
1718
prepareLowRankConvMat(tempW, tparams->W1, tparams->W2, tparams->rank, out_channels, in_channels * kernel_size);
18-
1919
// Perform the Convolution
2020
// input.shape = [in_T, in_channels]
2121
// output.shape = [out_T, out_channels]
@@ -58,7 +58,7 @@ int Conv1D_Depth_LR(float *output_signal, unsigned out_T, const float *input_sig
5858
}
5959

6060
float* tempW = (float*)malloc(in_channels * kernel_size * sizeof(float)) ;
61-
prepareLowRankConvMat(tempW, tparams->W1, tparams->W2, tparams->rank, in_channels, in_channels * kernel_size);
61+
prepareLowRankConvMat(tempW, tparams->W1, tparams->W2, tparams->rank, in_channels, kernel_size);
6262
// Perform the Convolution
6363
// input.shape = [N, in_T, in_channels]
6464
// output.shape = [N, out_T, in_channels]
@@ -84,7 +84,7 @@ int Conv1D_Depth_LR(float *output_signal, unsigned out_T, const float *input_sig
8484
}
8585
}
8686
}
87-
free(tempW);
87+
// free(tempW);
8888
return 0;
8989
}
9090

0 commit comments

Comments
 (0)