OS: CentOS 7.0
TensorRT: 5.0.0.10
TensorFlow: 1.7.0
Model: Inception V3
Description:
Firstly, I managed to convert a frozen model of InceptionV3 to UFF model by TensorRT 5.0.0.10. This conversion seems succeeded. Then I tried to parse the uff model but failed. Though the log shows “Segmentation fault (core dumped)”, there is no core file to debug actually. I would like to try the inference performance enhancement that brought by the new TRT version, but not sure whether my procedure is correct.
Any idea will be welcome.
Conversion Log:
$ convert-to-uff frozen_graph.pb
/home/karafuto/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Loading frozen_graph.pb
=== Automatically deduced input nodes ===
[name: "Placeholder"
op: "Placeholder"
attr {
key: "dtype"
value {
type: DT_FLOAT
}
}
attr {
key: "shape"
value {
shape {
dim {
size: -1
}
dim {
size: 299
}
dim {
size: 299
}
dim {
size: 3
}
}
}
}
]
=========================================
=== Automatically deduced output nodes ===
[name: "InceptionV3/Logits/SpatialSqueeze"
op: "Squeeze"
input: "InceptionV3/Logits/Conv2d_1c_1x1/BiasAdd"
attr {
key: "T"
value {
type: DT_FLOAT
}
}
attr {
key: "squeeze_dims"
value {
list {
i: 1
i: 2
}
}
}
]
==========================================
Using output node InceptionV3/Logits/SpatialSqueeze
Converting to UFF graph
Warning: keepdims is ignored by the UFF Parser and defaults to True
No. nodes: 789
UFF Output written to frozen_graph.uff
Parsing Log:
$ python trtuff_test.py
TensorRT Version: 5.0.0.10
TensorRT parse UFF model
Segmentation fault (core dumped)
Parser Script:
$ cat trtuff_test.py
import tensorrt as trt
print('TensorRT Version: '+trt.__version__)
model_file = './frozen_graph.uff'
TRT_LOGGER = trt.Logger(trt.Logger.WARNING)
print('TensorRT parse UFF model')
with trt.Builder(TRT_LOGGER) as builder, builder.create_network() as network, trt.UffParser() as parser:
parser.register_input("Placeholder", (-1,299,299,3))
parser.register_output("InceptionV3/Logits/SpatialSqueeze")
parser.parse(model_file, network)