上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 63 下一页
摘要: 本文部分内容摘自Python3 filter() 函数 描述 filter() 函数用于过滤序列,过滤掉不符合条件的元素,返回一个迭代器对象,如果要转换为列表,可以使用 list() 来转换。 filter() 函数接收两个参数,第一个为函数,第二个为序列,序列的每个元素作为参数传递给函数进行判,然 阅读全文
posted @ 2020-05-07 12:31 Picassooo 阅读(227) 评论(0) 推荐(0) 编辑
摘要: os模块是python标准库中的一个用于访问操作系统功能的模块。 系统操作 1 os.sep——获取路径分隔符 在Windows上,文件的路径分隔符是'\',在Linux上是'/'。例如:文件夹img下有一张图lake.jpg, windows的路径:img\lake.jpg Linux的路径:im 阅读全文
posted @ 2020-05-03 16:48 Picassooo 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 保存和加载模型 在PyTorch中使用torch.save来保存模型的结构和参数,有两种保存方式: # 方式一:保存模型的结构信息和参数信息 torch.save(model, './model.pth') # 方式二:仅保存模型的参数信息 torch.save(model.state_dict() 阅读全文
posted @ 2020-05-03 10:12 Picassooo 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 转:PyTorch 中,nn 与 nn.functional 有什么区别? 阅读全文
posted @ 2020-05-02 12:29 Picassooo 阅读(898) 评论(0) 推荐(0) 编辑
摘要: PyTorch有多种方法搭建神经网络,下面识别手写数字为例,介绍4种搭建神经网络的方法。 方法一:torch.nn.Sequential() torch.nn.Sequential类是torch.nn中的一种序列容器,参数会按照我们定义好的序列自动传递下去。 import torch.nn as n 阅读全文
posted @ 2020-05-02 12:19 Picassooo 阅读(2363) 评论(0) 推荐(0) 编辑
摘要: 程序来自莫烦Python,略有删减和改动。 import os import torch import torch.nn as nn import torch.utils.data as Data import torchvision import matplotlib.pyplot as plt 阅读全文
posted @ 2020-05-01 15:49 Picassooo 阅读(867) 评论(2) 推荐(0) 编辑
摘要: torch.mm(mat1, mat2) performs a matrix multiplication of mat1 and mat2 a = torch.randint(0, 5, (2, 3)) # tensor([[3, 3, 2], # [2, 2, 2]]) b = torch.ra 阅读全文
posted @ 2020-04-30 18:30 Picassooo 阅读(830) 评论(0) 推荐(0) 编辑
摘要: 准备入坑多模态学习,收集了一些关于多模态机器学习的信息。 微信公众号 多模态机器翻译论文推荐 | PaperWeekly 介绍了三篇2016年的用了图片信息的机器翻译论文 知乎 github 博客园 CSDN 数据集 比赛 ACL2016 Multimodal Machine Translation 阅读全文
posted @ 2020-04-30 16:40 Picassooo 阅读(633) 评论(0) 推荐(0) 编辑
摘要: 资深技术Leader肺腑忠告:如何成为技术大牛? 这篇文章介绍的“寻找范式、刻意练习、及时反馈;垂直打透、横向迁移、深度复盘;聪明人要下笨功夫”等方法和道理值得反复琢磨和消化。 阅读全文
posted @ 2020-04-29 09:37 Picassooo 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 激活函数总结(持续更新) 阅读全文
posted @ 2020-04-26 11:27 Picassooo 阅读(105) 评论(0) 推荐(0) 编辑
上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 63 下一页