JieHe96 / iOS_Tensorflow_ObjectDetection_Example

An iOS application of Tensorflow Object Detection with different models: SSD with Mobilenet, SSD with InceptionV2, Faster-RCNN-resnet101

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No OpKernel was registered to support Op 'Conv2D' with these attrs

Heng14 opened this issue · comments

commented

hi I run by step and occur this problem:
Invalid argument: No OpKernel was registered to support Op 'Conv2D' with these attrs. Registered devices: [CPU], Registered kernels:

 [[Node: FeatureExtractor/InceptionV2/InceptionV2/Conv2d_1a_7x7/separable_conv2d = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="VALID", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true](FeatureExtractor/InceptionV2/InceptionV2/Conv2d_1a_7x7/separable_conv2d/depthwise, FeatureExtractor/InceptionV2/Conv2d_1a_7x7/pointwise_weights/read)]]

and we also tried the SSD-mobilenet and will occur the same problem.
and I have tried the methods you gave but it seems not work. could you help me ? thanks~

Hi, thanks for trying my code.
I think it is because the problem in your ops_to_register.h. If you check the Makefile in "tensorflow/contrib/makefile", you could find a line "-DUSE_GEMM_FOR_CONV ", which means that the Makefile use GEMM for the conv. However, in your ops_to_register.h, I believe the generated txt didn't use the GEMM. Therefore, try to find the line "Conv2DOp<CPUDevice, float>" in your ops_to_register.h and replaced by "Conv2DUsingGemmOp< float, Im2ColConvFunctor<float, float, float, FastGemmFunctor<float, float, float>>>". Hope this method could solve your problem :)

commented

@JieHe96 it works! thanks so much!

If you find it is helpful, could you please star this repo? Thanks you so much! :)