From 33824c6f9b109f8582849860485c5f10eb44f600 Mon Sep 17 00:00:00 2001 From: Qing Lan Date: Mon, 13 Feb 2023 13:15:51 -0800 Subject: [PATCH] update t5 model conversion script to numpy mode --- examples/pytorch/t5/utils/huggingface_t5_ckpt_convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}")