UFFParser error: Unary not supported for other non-constant node


I’m using TensorRT- and Cuda 9.0. I have a trouble while I’m trying to build an engine for my unet neural network. I made this network in Keras. I got graph file(.pb) and I made uff model from it. Unfortunately, I’m getting this error:

UFFParser: Parser error: conv2d_9/Exp: Unary not supported for other non-constant node

I found similar topic but other people had problems with TensorRT 3 and if I understand it well, this should be fixed with TensorRT 4.

I forgot to say that I have NVIDIA GeForce GTX 1050 4GB GDDR5 graphics card.
Can you please give me some directions, how could I resolve this problem?


unary op support for a non-const node will be available in next release. We can’t discuss release schedules here, but please stay tuned for an announcement.


I am also having issues with an inability to convert a Keras network with a softmax layer to tensorrt. I understand that the UFF converter is capable of handling softmax layers provided the input to the layer is NHWC, is this correct? If so, is the issue with the UFF parser in tensorrt being unable to parse this layer? Is this the issue which you are saying will be corrected in the next release?

Has this issue since been fixed?


I have input of the Softmax layer in NHWC format as suggested by TensorRT documentation, however I still get the arror in UFF parser saying “softmax_1/Exp: Unary not supported for other non-constant node”. Is there something workaround to solve this issue, until the next release

You can try exporting the model without the top layer, then implementing your own softmax after the tensorrt inference.

Thanks a lot for your suggestion benm12y6, at the moment I have implemented the same solution as you mentioned. However, I still wants to know why softmax does not work even though I am giving the input in the same format as suggested(NHWC). What is the bug in my implementation ?

I do not know that there is a bug in your implementation. I believe that the UFF parser (in the c++ tensorrt package) does not support unary operations on non constant nodes. The confusing part to this is that, I believe the UFF exporter (in python) does support unary operations on non constant nodes. Softmax requires this functionality.

has there been an update in this regard as of TensorRT5.1??

I still seem to get this error on TensorRT5.1.

[TensorRT] ERROR: UFFParser: Parser error: activation_1/Exp: Unary not supported for other non-constant node
[TensorRT] ERROR: Network must have at least one output

I am using softmax layer in keras, Is this operation is available in latest version of TensorRT ( higher than, please provide alternative solution to solve this issue.

@NVES @all Any updates here ?Softmax still have the problem,even though the input to softmax is NHWC format. Tensorrt4

ERROR: UFFParser: Parser error: rpn_model_2/rpn_class_xxx/Exp: Unary not supported for other non-constant node

Hi @yalagamsrinivas, @all
Have you solved this problem with keras softmax, I followed the
permute the input to softmax to NHWC format, the error is still there.
Is there any alternative solution to solve this issue. @ NVES @AastaLLL
BTW, I can convert the h5 file to uff successfully. tensorrt4.