Help with RandomZoom

Hello,
I wish to apply a RandomZoom for the segmentation problem. I have written in the config json
{
“name”: “RandomZoom”,
“args”:
{
“image_field”: “image”,
“label_field”: “label”,
“lower_limits”: [0.90, 0.9, 0.90],
“upper_limits”: [1.20, 1.20, 1.20],
“use_gpu”: “True”,
“keep_size”: “True”,
“probability”: 0.1
}
},
but i am encounter a crash which i am unable to decipher. The error message starts with:
Traceback (most recent call last):
File “libs/data/chain_transformer.py”, line 20, in _apply_one_transform
File “components/transforms/random_zoom.py”, line 60, in transform
File “libs/transforms/spatial_zoomer.py”, line 169, in zoom
File “libs/transforms/multi_format_transformer.py”, line 78, in transform
File “libs/transforms/spatial_zoomer.py”, line 72, in _handle_cdhw
File “libs/transforms/spatial_zoomer.py”, line 62, in _zoom
File “<array_function internals>”, line 6, in pad
File “/usr/local/lib/python3.6/dist-packages/numpy/lib/arraypad.py”, line 741, in pad
pad_width = _as_pairs(pad_width, array.ndim, as_index=True)
File “/usr/local/lib/python3.6/dist-packages/numpy/lib/arraypad.py”, line 516, in _as_pairs
return np.broadcast_to(x, (ndim, 2)).tolist()
File “<array_function internals>”, line 6, in broadcast_to
File “/usr/local/lib/python3.6/dist-packages/numpy/lib/stride_tricks.py”, line 182, in broadcast_to
return _broadcast_to(array, shape, subok=subok, readonly=True)
File “/usr/local/lib/python3.6/dist-packages/numpy/lib/stride_tricks.py”, line 127, in _broadcast_to
op_flags=[‘readonly’], itershape=shape, order=‘C’)
ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (3,2) and requested shape (4,2)
2021-01-27 12:13:22,586 - ChainTransformer - ERROR - Error occurred while applying <class ‘ai4med.components.transforms.random_zoom.RandomZoom’> to following data dict.

[[0. 0. 0. … 0. 0. 0.]
[0. 0. 0. … 0. 0. 0.]
[0. 0. 0. … 0. 0. 0.]

[0. 0. 0. … 0. 0. 0.]
[0. 0. 0. … 0. 0. 0.]
[0. 0. 0. … 0. 0. 0.]]

[[0. 0. 0. … 0. 0. 0.]
[0. 0. 0. … 0. 0. 0.]
[0. 0. 0. … 0. 0. 0.]

any help welcome.
Regards
krishnan

Bump ! What I can see is that the

but I am unable to figure out why.

This seemed to be a shape mismatch. Can you let us know the image and label format? Are they 3D or 2D in spatial domain?

The images and labels are both 3D. The formats are all float32. If i remove this particular operation, the training proceeds as usual.
In the configuration file, I have mentioned “tensorImageSize”: “3D”.
thanks for reply.

May we ask for one pair of image and label and your complete config_train.json? We would like to reproduce the error in your case.