No OpKernel was registered to support Op 'Prod' with these attrs.
tamias65 opened this issue · comments
I'm trying to use your example with Tensorflow r1.4, and was able to successfully build and run with the ssd_mobilenet_v1_coco model with the ops_to_regsiter.h that includes ops for multiple models. However, when I tried to switch to faster_rcnn_resnet101_coco using the same build, I'm running into the following error when trying to load the model:
2017-10-30 18:00:28.307769: E [path]/tensorflow_utils.mm:209] Could not create TensorFlow Graph: Invalid argument: No OpKernel was registered to support Op 'Prod' with these attrs. Registered devices: [CPU], Registered kernels:
<no registered kernels>
[[Node: SecondStageBoxPredictor/Flatten/Prod = Prod[T=DT_INT32, Tidx=DT_INT32, keep_dims=false](SecondStageBoxPredictor/Flatten/Slice_1, SecondStageBoxPredictor/Flatten/Const)]]
2017-10-30 18:00:28.320101: F [path]/CameraExampleViewController.mm:495] Couldn't load model: Invalid argument: No OpKernel was registered to support Op 'Prod' with these attrs. Registered devices: [CPU], Registered kernels:
<no registered kernels>
[[Node: SecondStageBoxPredictor/Flatten/Prod = Prod[T=DT_INT32, Tidx=DT_INT32, keep_dims=false](SecondStageBoxPredictor/Flatten/Slice_1, SecondStageBoxPredictor/Flatten/Const)]]
From a closer examination, it looks like the "Prod" ops isn't in the ops_to_header.h
file and there's no cwise_op_prod.cc
file in the kernels to add to tp_ops_files.txt
. At the same time, I think "Prod" ops is already part of math_ops.cc
(?), and I have included -DANDROID_TYPES=ANDROID_TYPES_FULL
in the build to account for the expanded data types. So I have no clue why it's failing to load. Can anyone help?
This works after I rebuild the ops_to_headers.h file with print_selective_registration.h. Maybe something in the faster rcnn model changed recently.