Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Network must have at least one output #7

Open
ghost opened this issue Feb 14, 2020 · 4 comments
Open

ERROR: Network must have at least one output #7

ghost opened this issue Feb 14, 2020 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 14, 2020

Got the following error:
[TensorRT] ERROR: (Unnamed Layer* 32) [Concatenation]: all concat input tensors must have the same dimensions except on the concatenation axis (0), but dimensions mismatched at input 1 at index 1. Input 0 shape: [128,1216,1216], Input 1 shape: [256,608,608] [TensorRT] ERROR: Network must have at least one output Engine: None Traceback (most recent call last): File "create_trt_engine.py", line 51, in <module> main() File "create_trt_engine.py", line 48, in main save_engine(engine, trt_file) File "create_trt_engine.py", line 31, in save_engine buf = engine.serialize() AttributeError: 'NoneType' object has no attribute 'serialize'

My cfg;

`[net]

Testing

#batch=1
#subdivisions=1

Training

batch=64
subdivisions=16
width=608
height=608
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.001
burn_in=1000
max_batches = 12000
policy=steps
steps=7200,9600
scales=.1,.1

[convolutional]
batch_normalize=1
filters=16
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=32
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=64
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=1

[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[convolutional]
size=1
stride=1
pad=1
filters=18
activation=linear

[yolo]
mask = 3,4,5
anchors = 9,18, 13,27, 21,39, 29,59, 44,101, 70,146
classes=1
num=6
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1

[route]
layers = -4

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[upsample]
stride=2

[route]
layers = -1, 8

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[convolutional]
size=1
stride=1
pad=1
filters=18
activation=linear

[yolo]
mask = 0,1,2
anchors = 9,18, 13,27, 21,39, 29,59, 44,101, 70,146
classes=1
num=6
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1

`

@QZ-cmd
Copy link

QZ-cmd commented May 25, 2020

Hello,can you save this problem?i have same error

@Rapternmn
Copy link
Owner

Can you try with Batch = 1

@Rapternmn
Copy link
Owner

I have mentioned in README to first try with :
batch=1
width=416
height=416

@wavesCHJ
Copy link

wavesCHJ commented Aug 24, 2020

I have the same errors. this helps me.
NVIDIA/TensorRT#183 (comment)
the solution is change

with trt.Builder(TRT_LOGGER) as builder, builder.create_network() as network, trt.OnnxParser(network, TRT_LOGGER) as parser:

to

explicit_batch = 1 << (int)(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH)
with trt.Builder(TRT_LOGGER) as builder, builder.create_network(explicit_batch) as network, trt.OnnxParser(network, TRT_LOGGER) as parser:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants