登录社区云,与社区用户共同成长
邀请您加入社区
【代码】AttributeError: module 'safetensors' has no attribute 'torch'
AttributeError: module ‘safetensors’ has no attribute ‘torch’
Python3.10 Conda
在safetensors包的__init__.py文件中加入如下:
safetensors
__init__.py
from . import torch
ps:safetensors包在site-packages里面。
site-packages
如果是缺少tf的话,可同样引入。
tf
有“AI”的1024 = 2048,欢迎大家加入2048 AI社区
更多推荐
智能体来了,AI 在企业质量管理的核心落地场景
c51程序与esp32程序的区别
本文对比了不同嵌入式开发平台的编程特点:1)Arduino采用setup/loop函数替代main函数;2)Keil5需自定义延时函数,而Arduino提供内置delay();3)阻塞式与非阻塞式程序实现差异;4)GPIO配置差异,C51为准双向口,STM32/ESP32提供8种模式。文章还简要介绍了Arduino的pinMode()配置方式和C语言函数返回值概念。
刚刚,DeepSeek开源新模型!
扫一扫分享内容
所有评论(0)