|
|
|
@ -286,12 +286,14 @@ public: |
|
|
|
|
{ |
|
|
|
|
CV_CheckEQ(inputs.size(), (size_t)1, ""); |
|
|
|
|
for (auto input : inputs) |
|
|
|
|
{ |
|
|
|
|
if (preferableTarget == DNN_TARGET_CUDA_FP16 || preferableTarget == DNN_TARGET_CUDA) |
|
|
|
|
CV_CheckEQ(input, CV_32F, "Unsupported type"); |
|
|
|
|
else if (preferableTarget == DNN_TARGET_OPENCL_FP16) |
|
|
|
|
CV_CheckType(input, input == CV_16F || input == CV_8S || input == CV_32S || input == CV_64S, ""); |
|
|
|
|
else |
|
|
|
|
CV_CheckType(input, input == CV_32F || input == CV_8S || input == CV_32S || input == CV_64S, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
outputs.assign(requiredOutputs, inputs[0]); |
|
|
|
|
} |
|
|
|
@ -908,12 +910,14 @@ public: |
|
|
|
|
{ |
|
|
|
|
CV_CheckEQ(inputs.size(), (size_t)2, ""); |
|
|
|
|
for (auto input : inputs) |
|
|
|
|
{ |
|
|
|
|
if (preferableTarget == DNN_TARGET_CUDA_FP16 || preferableTarget == DNN_TARGET_CUDA) |
|
|
|
|
CV_CheckTypeEQ(input, CV_32F, "Unsupported type"); |
|
|
|
|
else if (preferableTarget == DNN_TARGET_OPENCL_FP16) |
|
|
|
|
CV_CheckType(input, input == CV_16F || input == CV_8S || input == CV_32S || input == CV_64S, ""); |
|
|
|
|
else |
|
|
|
|
CV_CheckType(input, input == CV_32F || input == CV_8S || input == CV_32S || input == CV_64S, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
outputs.assign(requiredOutputs, inputs[0]); |
|
|
|
|
} |
|
|
|
|