Closed YanhaoZhang closed 3 years ago
Hi,
I suppose they are [B, H, W]. Since we compute dims as tuple(range(predict.ndimension())[1:])
, I think the purpose of [1:]
here is to remove the batch dimension. You can also verify this by printing the tensor shape while calling the function. Actually, it can be any shape starting with the batch dimension, e.g. [B, N], [B, 1, H, W], etc.
@ShichenLiu Got it. Thanks a lot for your prompt reply. Now I understand it. :+1:
Hi, thanks a lot for releasing the code. I am trying to use the image rendering and IoU loss as proposed in demo_deform.py. May I know the size of the two inputs of this function, i.e., predict and target? Are they [B, H, W] or [H, W]? Thanks a lot.