Python
岛的博客
本硕985 EE,博士UTS NLP在读。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
fairseq pip install 时 pkg_resources 出现 TypeError的解决方案。
fairseq pip install 时 pkg_resources 出现 TypeError的解决方案。原创 2023-01-29 20:40:06 · 1514 阅读 · 0 评论 -
无法解析的外部符号 cudaLaunchKernel 等的解决方案
无法解析的外部符号 cudaLaunchKernel 等的解决方案原创 2023-01-29 20:23:25 · 2172 阅读 · 0 评论 -
identifier “THCudaCheck“ is undefined 的解决方法
在 pytorch 1.11.0 版本被移除了原创 2023-01-28 20:17:46 · 2234 阅读 · 3 评论 -
MNIST 数据集解析和代码实现
首先MNIST数据集主要分为4个部分,分别是:t10k-images-idx3-ubyte test image (10,000)t10k-labels-idx1-ubyte test label (10,000)train-images-idx3-ubyte train image (60,000)train-labels-idx1-ubyte train label (60,000)官网链接:http://yann.lecun.com/exdb/mnist首先下载数据,用urll原创 2020-08-28 12:32:54 · 712 阅读 · 0 评论 -
Python 两个for循环实现列表平铺
假设输入为a = [[1, 2], [3, 4]]我们希望得到b = [1, 2, 3, 4]可以采用两个for 循环实现c = [n for num in a for n in num]这段代码首先迭代a,得到 [1, 2], [3, 4] 两个列表,但是每次yield 一个列表所以首先得到 num = [1, 2],然后再执行第二个for循环,第二个循环迭代num,所以得到1, 2 两个num,所以暂时得到 c = [1, 2 ..,然后再在第二个num列表中循环得到 c = ...原创 2020-05-27 11:46:25 · 2359 阅读 · 0 评论
分享