Community
cancel
Showing results for 
Search instead for 
Did you mean: 
WU__Tianwen
New Contributor I
541 Views

YOLOV4 activation support !!softplus

https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_Supported_Devices.html

 

I checked the activation functions supported by openvino and found that softplus activation functions are supported under GPU. So I did a simple test to see if openvino can support yolov4

i just change the activation function to mish function in mystic123's code like this :activation_fn=lambda x:x* tf.math.tanh(tf.math.softplus(x))

openvino can convert tf.math.tanh() but it fail to convert tf.math,softplus(),errors happen:

[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_37/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_13/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_29/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_20/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_48/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_42/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_31/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_51/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_21/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_13/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_8/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_3/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_49/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_2/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_18/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_28/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_18/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_5/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_14/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_35/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_12/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_23/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_38/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_45/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_11/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_30/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_9/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_5/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_25/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_16/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_8/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_22/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_3/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_33/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_10/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_22/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_20/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_19/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_1/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_1/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_11/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_19/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_27/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_50/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_17/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_4/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_6/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_15/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_21/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_36/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_43/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_41/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_17/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_24/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_2/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_44/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_46/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_14/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_16/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_12/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_40/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_9/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_4/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_26/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv_10/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_7/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_6/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_34/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_39/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_47/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/yolo-v3/Conv/Softplus with type=<UNKNOWN>
[ WARNING ]  Please set `version` attribute for node detector/darknet-53/Conv_32/Softplus with type=<UNKNOWN>
[ ERROR ]  List of operations that cannot be converted to Inference Engine IR:
[ ERROR ]      Softplus (73)
[ ERROR ]          detector/darknet-53/Conv/Softplus
[ ERROR ]          detector/darknet-53/Conv_1/Softplus
[ ERROR ]          detector/darknet-53/Conv_2/Softplus
[ ERROR ]          detector/darknet-53/Conv_3/Softplus
[ ERROR ]          detector/darknet-53/Conv_4/Softplus
[ ERROR ]          detector/darknet-53/Conv_5/Softplus
[ ERROR ]          detector/darknet-53/Conv_6/Softplus
[ ERROR ]          detector/darknet-53/Conv_7/Softplus
[ ERROR ]          detector/darknet-53/Conv_8/Softplus
[ ERROR ]          detector/darknet-53/Conv_9/Softplus
[ ERROR ]          detector/darknet-53/Conv_10/Softplus
[ ERROR ]          detector/darknet-53/Conv_11/Softplus
[ ERROR ]          detector/darknet-53/Conv_12/Softplus
[ ERROR ]          detector/darknet-53/Conv_13/Softplus
[ ERROR ]          detector/darknet-53/Conv_14/Softplus
[ ERROR ]          detector/darknet-53/Conv_15/Softplus
[ ERROR ]          detector/darknet-53/Conv_16/Softplus
[ ERROR ]          detector/darknet-53/Conv_17/Softplus
[ ERROR ]          detector/darknet-53/Conv_18/Softplus
[ ERROR ]          detector/darknet-53/Conv_19/Softplus
[ ERROR ]          detector/darknet-53/Conv_20/Softplus
[ ERROR ]          detector/darknet-53/Conv_21/Softplus
[ ERROR ]          detector/darknet-53/Conv_22/Softplus
[ ERROR ]          detector/darknet-53/Conv_23/Softplus
[ ERROR ]          detector/darknet-53/Conv_24/Softplus
[ ERROR ]          detector/darknet-53/Conv_25/Softplus
[ ERROR ]          detector/darknet-53/Conv_26/Softplus
[ ERROR ]          detector/darknet-53/Conv_27/Softplus
[ ERROR ]          detector/darknet-53/Conv_28/Softplus
[ ERROR ]          detector/darknet-53/Conv_29/Softplus
[ ERROR ]          detector/darknet-53/Conv_30/Softplus
[ ERROR ]          detector/darknet-53/Conv_31/Softplus
[ ERROR ]          detector/darknet-53/Conv_32/Softplus
[ ERROR ]          detector/darknet-53/Conv_33/Softplus
[ ERROR ]          detector/darknet-53/Conv_34/Softplus
[ ERROR ]          detector/darknet-53/Conv_35/Softplus
[ ERROR ]          detector/darknet-53/Conv_36/Softplus
[ ERROR ]          detector/darknet-53/Conv_37/Softplus
[ ERROR ]          detector/darknet-53/Conv_38/Softplus
[ ERROR ]          detector/darknet-53/Conv_39/Softplus
[ ERROR ]          detector/darknet-53/Conv_40/Softplus
[ ERROR ]          detector/darknet-53/Conv_41/Softplus
[ ERROR ]          detector/darknet-53/Conv_42/Softplus
[ ERROR ]          detector/darknet-53/Conv_43/Softplus
[ ERROR ]          detector/darknet-53/Conv_44/Softplus
[ ERROR ]          detector/darknet-53/Conv_45/Softplus
[ ERROR ]          detector/darknet-53/Conv_46/Softplus
[ ERROR ]          detector/darknet-53/Conv_47/Softplus
[ ERROR ]          detector/darknet-53/Conv_48/Softplus
[ ERROR ]          detector/darknet-53/Conv_49/Softplus
[ ERROR ]          detector/darknet-53/Conv_50/Softplus
[ ERROR ]          detector/darknet-53/Conv_51/Softplus
[ ERROR ]          detector/yolo-v3/Conv/Softplus
[ ERROR ]          detector/yolo-v3/Conv_1/Softplus
[ ERROR ]          detector/yolo-v3/Conv_2/Softplus
[ ERROR ]          detector/yolo-v3/Conv_3/Softplus
[ ERROR ]          detector/yolo-v3/Conv_4/Softplus
[ ERROR ]          detector/yolo-v3/Conv_5/Softplus
[ ERROR ]          detector/yolo-v3/Conv_8/Softplus
[ ERROR ]          detector/yolo-v3/Conv_9/Softplus
[ ERROR ]          detector/yolo-v3/Conv_10/Softplus
[ ERROR ]          detector/yolo-v3/Conv_11/Softplus
[ ERROR ]          detector/yolo-v3/Conv_12/Softplus
[ ERROR ]          detector/yolo-v3/Conv_13/Softplus
[ ERROR ]          detector/yolo-v3/Conv_14/Softplus
[ ERROR ]          detector/yolo-v3/Conv_16/Softplus
[ ERROR ]          detector/yolo-v3/Conv_17/Softplus
[ ERROR ]          detector/yolo-v3/Conv_18/Softplus
[ ERROR ]          detector/yolo-v3/Conv_19/Softplus
[ ERROR ]          detector/yolo-v3/Conv_20/Softplus
[ ERROR ]          detector/yolo-v3/Conv_21/Softplus
[ ERROR ]          detector/yolo-v3/Conv_22/Softplus
[ ERROR ]          detector/yolo-v3/Conv_6/Softplus

 

openvino guide book says CPU not support softplus function ,but GPU support.and i correctly configured GPU environment。

 

0 Kudos
2 Replies
Munesh_Intel
Moderator
541 Views

Hi Tianwen,

Softplus operation is not supported by Model Optimizer.

More information about Model Optimizer supported framework layers is available at the following page:

https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_Supported_Frameworks_Layers.html

In addition to that, YOLOv4 is also not supported officially by OpenVINO.

However, you can still test and validate YOLOv4 on your end with some workaround.

There is one way for now to run YOLOv4 through OpenCV which will build network using nGraph API and then pass to Inference Engine.

See https://github.com/opencv/opencv/pull/17185

The key problem is the Mish activation function - there is no optimized implementation yet, which is why we have to implement it by definition with tanh and exponential functions.

 

Regards,
Munesh

WU__Tianwen
New Contributor I
541 Views

hello Munesh,

When I saw that Intel GPU supports Softplus, I thought I could implement yolov4 myself. I ignored that softplus operation is not supported by Tensorflwow Model Optimize yet. Thank you very much. I will continue to try to optimize yolov3 network structure under OpenVINO, and look forward to the official support of yolov4

 

Thanks ^-^

Reply