mxnet_Realtime_Multi-Person_Pose_Estimation
mxnet_Realtime_Multi-Person_Pose_Estimation copied to clipboard
InferShape error when running testModel.ipynb
@dragonfly90 I'm trying to test a model that I trained myself. I've changed the output_prefix
to "testConfigModel"
. However, I get this error in this line in testModel.ipynb
:
cmodel = mx.mod.Module(symbol=sym, label_names=[])
cmodel.bind(data_shapes=[('data', (1,3,
testimage.shape[1],testimage.shape[2]))])
RuntimeError: simple_bind error. Arguments:
data: (1, 3, 184, 200)
[11:30:05] src/executor/graph_executor.cc:413: InferShape pass cannot decide shapes for the following arguments (0s means unknown dimensions). Please consider providing them as inputs:
partaffinityglabel: (), vecweight: (), heatmaplabel: (), heatweight: (),
@jaxony, the test model should be different with train model, Like the following, the test model output is Mconv7_stage6_L2 instead of stage6_loss_L2. In training, we need stage6_loss_L2 to backpropagation loss. In testing, we just need Mconv7_stage6_L2 to output heatmap or pafmap.
Mconv7_stage6_L2r = mx.symbol.Reshape(data=Mconv7_stage6_L2, shape=(-1,), name='Mconv7_stage3_L2')
#heatmaplabelr = mx.symbol.Reshape(data=heatmaplabel, shape=(-1, ), name='heatmaplabelr')
stage6_loss_L2s = mx.symbol.square(Mconv7_stage6_L2r-heatmaplabelr)
#heatweightw = mx.symbol.Reshape(data=heatweight, shape=(-1,), name='conv5_5_CPM_L1r')
stage6_loss_L2w = stage6_loss_L2s*heatweightw
stage6_loss_L2 = mx.symbol.MakeLoss(stage6_loss_L2w)
@dragonfly90 Thanks for your fast response! I plotted out the different networks and realised that the realtimePose
network is for inference (which is what is required in testModel.ipynb
) whereas the model file that I was using was the training one with other blobs in there.
@dragonfly90 i have encounter same problem ? but i don't know how to fix it. could you give me some samples? thanks a lot!