摘要:
☆1.模拟一个trim()方法,去除字符串两端的空格。 public String myTrim(String str){ int start = 0; int end = str.length() - 1; while(start < end && str.charAt(start) == ' ' 阅读全文
摘要:
错误原因: 训练保存模型时,torch的版本是1.6.0(使用torch.__version__可以查看torch的版本号) 而加载模型时,torch的版本号低于1.6.0 解决方案: If for any reason you want torch.save to use the old form 阅读全文
摘要:
错误描述: RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine 阅读全文