会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
LUKABY
博客园
首页
新随笔
联系
订阅
管理
2025年5月25日
读取csv文件并转换为tensor数据类型
摘要: 1、使用os.path.join()来创建路径字符串,使用with open()来打开文件,传入路径字符串,生成文件对象f 2、csv文件是使用逗号作为分隔符的文本文件,和excle有区别。使用pd.read_csv()来读取csv文件,返回的数据类型为dataframe 3、使用data.iloc
阅读全文
posted @ 2025-05-25 01:06 Kotomo
阅读(78)
评论(0)
推荐(0)
2025年5月24日
pytorch数据操作,如何新建tensor类型张量
摘要: 1、torch中的数据类型为“张量”tensor,tensor可以是一维,也可以是多维。 2、可以直接用torch.tensor来生成张量,如: 3、也可以使用torch.arange()函数来创建张量,类似与python的range()函数: 使用dtype来指定元素数据类型,使用reshape(
阅读全文
posted @ 2025-05-24 00:53 Kotomo
阅读(54)
评论(0)
推荐(0)
2025年5月23日
ubuntu为多个conda环境配置jupyter
摘要: 由于多个环境中只需要安装一个 jupyter ,这里将 jupyter 单独安装在一个环境中,对其他环境进行隔离。每次使用jupyter之前,都需要先进入这个jupyter环境。 conda create -n jupyter python=3.8 activate jupyter pip inst
阅读全文
posted @ 2025-05-23 14:39 Kotomo
阅读(111)
评论(0)
推荐(0)
公告