msracver / Relation-Networks-for-Object-Detection

Relation Networks for Object Detection
MIT License
1.09k stars 190 forks source link

errors when calling output_shapes #29

Closed twmht closed 5 years ago

twmht commented 5 years ago

Hi,

there is an error when calling output_shapes (https://github.com/msracver/Relation-Networks-for-Object-Detection/blob/master/relation_rcnn/core/module.py#L216)

  File "experiments/relation_rcnn/rcnn_end2end_train_test.py", line 21, in <module>
    train_end2end.main()
  File "experiments/relation_rcnn/../../relation_rcnn/train_end2end.py", line 184, in main
    config.TRAIN.begin_epoch, config.TRAIN.end_epoch, config.TRAIN.lr, config.TRAIN.lr_step)
  File "experiments/relation_rcnn/../../relation_rcnn/train_end2end.py", line 177, in train_net
    arg_params=arg_params, aux_params=aux_params, begin_epoch=begin_epoch, num_epoch=end_epoch)
  File "experiments/relation_rcnn/../../relation_rcnn/core/module.py", line 1001, in fit
    print ('output shape {}'.format(self.output_shapes))
  File "experiments/relation_rcnn/../../relation_rcnn/core/module.py", line 801, in output_shapes
    return self._curr_module.output_shapes
  File "experiments/relation_rcnn/../../relation_rcnn/core/module.py", line 223, in output_shapes
    return self._exec_group.get_output_shapes()
AttributeError: 'DataParallelExecutorGroup' object has no attribute 'get_output_shapes'

Any advise?

chengdazhi commented 5 years ago

Hi, we have never encounter this error before, nor have we see any issues regarding this matter. Please make sure that you are using the right mxnet version.

ancientmooner commented 5 years ago

You could try MutableModule instead of Module. Our code is based on MutableModule which supports variable sized input. Module has not been tested.