Closed kidcad1412 closed 9 months ago
change_detector.py(103)_get_test_inputs():
def _get_test_inputs(self, image_shape):
if image_shape is not None:
if len(image_shape) == 2:
image_shape = [1, 3] + image_shape
self._fix_transforms_shape(image_shape[-2:])
else:
image_shape = [None, 3, -1, -1]
self.fixed_input_shape = image_shape
return [
InputSpec(
shape=image_shape, name='image', dtype='float32'), InputSpec(
shape=image_shape, name='image2', dtype='float32')
]
这里返回的一个list,export模型时:
ValueError(error_msg) ValueError: The decorated function forwardrequires 1 arguments: ['x'], but received 2 with (InputSpec(shape=(-1, 3, 256, 256), dtype=paddle.float32, name=image), InputSpec(shape=(-1, 3, 256, 256), dtype=paddle.float32, name=image2))
已解决,paddlers 版本的问题
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Thanks for your issue. To help us better solve the issue, please provide the following information:
欢迎您的提问。辛苦您提供以下信息,以方便我们快速定位和解决问题:
在进行export 模型的时候:
python myexport_models.py --model_dir /home/app/changedetect/PaddleRS-develop/tutorials/train/change_detection/output/bit_resnet18/epoch_150 --save_dir exportouttest --fixed_input_shape [-1,3,256,256]