摘要: 参考 https://mathpretty.com/12065.html 简单的来说, 参数0代表竖着加 参数1代表横着加 阅读全文
posted @ 2022-07-22 23:53 猪猪猪猪侠 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 官方的教程的实例代码如下: import os import pandas as pd from torchvision.io import read_image class CustomImageDataset(Dataset): def __init__(self, annotations_fi 阅读全文
posted @ 2022-07-20 23:33 猪猪猪猪侠 阅读(225) 评论(0) 推荐(0) 编辑
摘要: https://wenku.baidu.com/view/88e2d3d8740bf78a6529647d27284b73f24236b8.html 阅读全文
posted @ 2022-07-19 23:21 猪猪猪猪侠 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 记得在代码的开始引入 import torch import torch.nn as nn 举个常用的例子 #以下代码为pytorch的python代码 embedding = nn.Embedding(10, 3) print(embedding.weight) input = torch.Lon 阅读全文
posted @ 2022-07-18 23:28 猪猪猪猪侠 阅读(601) 评论(0) 推荐(0) 编辑
摘要: dataloader里面的num_workers在windows操作系统上一定要改成0,不然会报错 RuntimeError: expected scalar type Float but found Double 将数据类型由float64改成float32即可 阅读全文
posted @ 2022-07-17 11:38 猪猪猪猪侠 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 切换到需要下载d2l库的虚拟环境,输入以下命令即可 pip install d2l -i https://pypi.doubanio.com/simple/ 阅读全文
posted @ 2022-07-17 11:35 猪猪猪猪侠 阅读(1133) 评论(0) 推荐(0) 编辑
摘要: 完美解决方案 https://www.codeleading.com/article/83805956540/ 阅读全文
posted @ 2022-06-10 11:13 猪猪猪猪侠 阅读(86) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/weixin_30814319/article/details/101666029 https://blog.csdn.net/qq_35425070/article/details/106883833 注意:这个文件是在项目的根目录下,不是在.git文件 阅读全文
posted @ 2022-06-03 15:24 猪猪猪猪侠 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 题目 题目重点 刚开始看会因为年份计算而头疼,因为年分为闰年和平年,这样会给计算带来很多的复杂性。 但是题目中提示“不用显示出年月日”,暗示了不用关注年份计算的复杂性,此时只用以“天”为单位进行计算。 1s=1000ms 1min=60s 1hour=60min 注意:输入不能超过10^18,要小心 阅读全文
posted @ 2022-01-17 22:35 猪猪猪猪侠 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 。。。 阅读全文
posted @ 2022-01-17 22:34 猪猪猪猪侠 阅读(24) 评论(0) 推荐(0) 编辑