diff --git a/examples/pytorch/t5/utils/huggingface_t5_ckpt_convert.py b/examples/pytorch/t5/utils/huggingface_t5_ckpt_convert.py index bac188715..0308b0ec3 100644 --- a/examples/pytorch/t5/utils/huggingface_t5_ckpt_convert.py +++ b/examples/pytorch/t5/utils/huggingface_t5_ckpt_convert.py @@ -68,7 +68,7 @@ def fuse_decoder_qkv(model, factor, saved_dir, np_weight_data_type): def split_and_convert_process(key, val, factor, saved_dir): - if val.dim() == 2: + if val.ndim == 2: val = val.transpose(1, 0) saved_key = key LOGGER.debug(f"key: {key}, val.shape: {val.shape}")