提交 893a19b2 编写于 作者: R Ray Liu 提交者: GitHub

Merge pull request #1212 from codeWorm2015/opencl

 format files
...@@ -125,7 +125,6 @@ bool ConvAddBNReluKernel<GPU_CL, float>::Init( ...@@ -125,7 +125,6 @@ bool ConvAddBNReluKernel<GPU_CL, float>::Init(
param->SetOffset(offset); param->SetOffset(offset);
/* /*
if (param->Filter()->dims()[2] == 1 && if (param->Filter()->dims()[2] == 1 &&
param->Filter()->dims()[3] == 1 && param->Filter()->dims()[3] == 1 &&
...@@ -136,8 +135,7 @@ bool ConvAddBNReluKernel<GPU_CL, float>::Init( ...@@ -136,8 +135,7 @@ bool ConvAddBNReluKernel<GPU_CL, float>::Init(
DLOG << " conv add bn relu conv 1x1 4"; DLOG << " conv add bn relu conv 1x1 4";
} }
*/ */
if (param->Filter()->dims()[2] == 1 && if (param->Filter()->dims()[2] == 1 && param->Filter()->dims()[3] == 1) {
param->Filter()->dims()[3] == 1) {
param->Filter()->InitNImage(cl_helper_.CLContext(), param->Filter()->InitNImage(cl_helper_.CLContext(),
cl_helper_.CLCommandQueue()); cl_helper_.CLCommandQueue());
this->cl_helper_.AddKernel("conv_1x1", "conv_add_bn_relu_kernel.cl"); this->cl_helper_.AddKernel("conv_1x1", "conv_add_bn_relu_kernel.cl");
......
...@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include <string>
#include <iostream> #include <iostream>
#include <string>
#include "../test_helper.h" #include "../test_helper.h"
#include "framework/loader.h" #include "framework/loader.h"
...@@ -37,8 +37,8 @@ int main() { ...@@ -37,8 +37,8 @@ int main() {
// auto program = loader.Load(g_mobilenet_ssd, true); // auto program = loader.Load(g_mobilenet_ssd, true);
// auto program = loader.Load(std::string(g_ocr) + "/model", // auto program = loader.Load(std::string(g_ocr) + "/model",
// std::string(g_ocr) + "/params", false); // std::string(g_ocr) + "/params", false);
// program.originProgram->Description("program desc: "); // program.originProgram->Description("program desc: ");
return 0; return 0;
......
...@@ -58,9 +58,9 @@ int main() { ...@@ -58,9 +58,9 @@ int main() {
std::max_element(std::begin(vec_result), std::end(vec_result)); std::max_element(std::begin(vec_result), std::end(vec_result));
std::cout << " Max element is " << *biggest << " at position " std::cout << " Max element is " << *biggest << " at position "
<< std::distance(std::begin(vec_result), biggest) << std::endl; << std::distance(std::begin(vec_result), biggest) << std::endl;
// for (float i : vec_result) { // for (float i : vec_result) {
// std::cout << i << std::endl; // std::cout << i << std::endl;
// } // }
} }
return 0; return 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册