RuntimeError: “slow_conv2d_cpu“ not implemented for ‘Half‘

目录

临时解决方法:


RuntimeError: "slow_conv2d_cpu" not implemented for 'Half'

train_lora.py中:

原因:cpu不支持fp16类型,

临时解决方法:

注释掉fp16模式,

    weight_dtype = torch.float32
    if accelerator.mixed_precision == "fp16":
        weight_dtype = torch.float16
    elif accelerator.mixed_precision == "bf16":
        weight_dtype = torch.bfloat16

还有一种方法,加上cuda(),还没测试。

你可能感兴趣的:(python基础,pytorch,深度学习,人工智能)