I am attempting to evaluate my Detectnet_v2 model after training using the instructions found here: Integrating TAO Models into DeepStream — TAO Toolkit 3.22.05 documentation
I am getting this error:
ValueError: Cannot reshape a tensor with 98304 elements to shape [4,2,4,24,78] (59904 elements) for 'reshape_1_1/Reshape' (op: 'Reshape') with input shapes: [4,8,48,64], [5] and with input tensors computed as partial shapes: input[1] = [4,2,4,24,78].
For evaluation, I have used KITTI data that has the same shape as the training/validation data used for training. I have converted this data into TFRecords using the tool tlt-dataset-convert
.
Below is the command I’ve used and the resulting stack trace:
tlt-evaluate detectnet_v2 -e specs/detectnet2_resnet18_test.txt -m output/weights/model.tlt -k ${NGC_API_KEY}
Using TensorFlow backend.
2019-10-21 21:50:37,119 [INFO] iva.detectnet_v2.spec_handler.spec_loader: Merging specification from specs/detectnet2_resnet18_test.txt
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
2019-10-21 21:50:37,412 [WARNING] tensorflow: From /usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
2019-10-21 21:50:38.295959: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-10-21 21:50:38.395926: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-10-21 21:50:38.396472: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x7f47550 executing computations on platform CUDA. Devices:
2019-10-21 21:50:38.396491: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): GeForce GTX 1660 Ti, Compute Capability 7.5
2019-10-21 21:50:38.418439: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3000000000 Hz
2019-10-21 21:50:38.418891: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x7fb02a0 executing computations on platform Host. Devices:
2019-10-21 21:50:38.418910: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): <undefined>, <undefined>
2019-10-21 21:50:38.419178: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties:
name: GeForce GTX 1660 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.77
pciBusID: 0000:01:00.0
totalMemory: 5.77GiB freeMemory: 515.75MiB
2019-10-21 21:50:38.419195: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2019-10-21 21:50:38.419929: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-10-21 21:50:38.419939: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0
2019-10-21 21:50:38.419945: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N
2019-10-21 21:50:38.420017: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 290 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1660 Ti, pci bus id: 0000:01:00.0, compute capability: 7.5)
/usr/local/lib/python2.7/dist-packages/keras/engine/saving.py:292: UserWarning: No training configuration found in save file: the model was *not* compiled. Compile it manually.
warnings.warn('No training configuration found in save file: '
WARNING:tensorflow:From ./detectnet_v2/dataloader/utilities.py:114: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.
Instructions for updating:
Use eager execution and:
`tf.data.TFRecordDataset(path)`
2019-10-21 21:50:39,922 [WARNING] tensorflow: From ./detectnet_v2/dataloader/utilities.py:114: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.
Instructions for updating:
Use eager execution and:
`tf.data.TFRecordDataset(path)`
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
2019-10-21 21:50:41,177 [INFO] /usr/local/lib/python2.7/dist-packages/iva/detectnet_v2/evaluation/build_evaluator.pyc: Found 579 samples in validation set
Traceback (most recent call last):
File "/usr/local/bin/tlt-evaluate", line 10, in <module>
sys.exit(main())
File "./common/magnet_evaluate.py", line 38, in main
File "</usr/local/lib/python2.7/dist-packages/decorator.pyc:decorator-gen-2>", line 2, in main
File "./detectnet_v2/utilities/timer.py", line 46, in wrapped_fn
File "./detectnet_v2/scripts/evaluate.py", line 119, in main
File "./detectnet_v2/evaluation/build_evaluator.py", line 124, in build_evaluator_for_trained_gridbox
File "./detectnet_v2/model/utilities.py", line 26, in _fn_wrapper
File "./detectnet_v2/model/detectnet_model.py", line 617, in build_validation_graph
File "./detectnet_v2/model/utilities.py", line 26, in _fn_wrapper
File "./detectnet_v2/model/detectnet_model.py", line 582, in build_inference_graph
File "./detectnet_v2/model/detectnet_model.py", line 243, in predictions_to_dict
File "./detectnet_v2/objectives/base_objective.py", line 97, in reshape_output
File "/usr/local/lib/python2.7/dist-packages/keras/engine/base_layer.py", line 457, in __call__
output = self.call(inputs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/layers/core.py", line 401, in call
return K.reshape(inputs, (K.shape(inputs)[0],) + self.target_shape)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 1969, in reshape
return tf.reshape(x, shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 7179, in reshape
"Reshape", tensor=tensor, shape=shape, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 3300, in create_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1823, in __init__
control_input_ops)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1662, in _create_c_op
raise ValueError(str(e))
ValueError: Cannot reshape a tensor with 98304 elements to shape [4,2,4,24,78] (59904 elements) for 'reshape_1_1/Reshape' (op: 'Reshape') with input shapes: [4,8,48,64], [5] and with input tensors computed as partial shapes: input[1] = [4,2,4,24,78].
Can anyone comment as to what may be my issue?
Thanks in advance for any suggestions or insight.