human-pose-estimation.pytorch icon indicating copy to clipboard operation
human-pose-estimation.pytorch copied to clipboard

The use of split in the loss function? What is it for?

Open jahdiel opened this issue 6 years ago • 1 comments

This code is in core/loss.py: heatmaps_pred = output.reshape((batch_size, num_joints, -1)).split(1, 1)

I was just wondering what is the split(1,1) for? I From my understanding it splits the tensor into equally sized tensors along the 1 axis, but I am not understanding why split into tensors of size 1? Hope somebody can help. Thanks

jahdiel avatar Mar 13 '19 13:03 jahdiel

I believe the author did it just for the convenience of using target weight. No other particular reasons.

sjiang17 avatar Apr 10 '19 06:04 sjiang17