上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 21 下一页
摘要: 从文本中读取的数据按数组的形式存放,比Python的list速度快。 阅读全文
posted @ 2020-06-01 19:46 6+0 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1、数据集 (1)继承Dataset或使用tv.datasets.ImageFolder() 目标路径下有至少一个文件夹 (2)tv.transforms.Compose (3)加载数据 (4)数据分组 class Dataset(torch.utils.data.Dataset): def __i 阅读全文
posted @ 2020-04-08 16:06 6+0 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 1、Image.fromarray(np.uint8(img)) 阅读全文
posted @ 2020-04-06 12:32 6+0 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 创建:conda create -n env_name python=3.7 删除:conda remove -n env_name --all 激活:conda/source activate env_name 切换到上一个Python环境:conda/source deactivate 安装包: 阅读全文
posted @ 2020-03-13 16:20 6+0 阅读(208) 评论(0) 推荐(0) 编辑
摘要: import torch import torch.nn.functional as F from collections import OrderedDict # Method 1 class Net1(torch.nn.Module): def __init__(self): super(Net 阅读全文
posted @ 2020-03-08 19:52 6+0 阅读(1084) 评论(0) 推荐(0) 编辑
摘要: 1、torch.nn.CrossEntropyLoss() 用于多分类问题 loss_func=torch.nn.CrossEntropyLoss() loss=loss_func(input_data,input_target) 其中input_data的shape一般是(batch_size,o 阅读全文
posted @ 2020-02-24 16:19 6+0 阅读(283) 评论(0) 推荐(0) 编辑
摘要: import torch as tfrom torch.utils import dataimport osfrom PIL import Imageimport numpy as np import torchvision.transforms as T transforms = T.Compos 阅读全文
posted @ 2020-02-17 10:06 6+0 阅读(2655) 评论(1) 推荐(1) 编辑
摘要: 1、'-'.join([1, 2, 3]) #1-2-3 2、print('姓名%s, 年龄%s'%(name, age)) print('{}'.format(a)) 3、os.listdir #获取指定文件夹里面的文件或文件夹列表 4、os.path.join(root, img) #将多个部分 阅读全文
posted @ 2020-02-14 17:09 6+0 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 神经元:函数 神经网络(模型)的本质:函数网络 深度学习的本质:反向传播求偏导 梯度:向量(有大小和方向),函数在该点的方向导数取得最大值的方向,在该点处梯度的方向为函数变化最快的方向 梯度下降:梯度的负方向是函数下降最快的方向 收敛:取得最小值 权重:输入进入神经元前乘的数 偏置:乘完权重加的数 阅读全文
posted @ 2020-02-13 17:57 6+0 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 2017年 一种基于动态图的深度学习框架 计算图包括静态计算图(先定义再运行)和动态计算图(在运行中定义) Tensor:n维数组,与numpy的ndarray类似,但支持GPU加速 阅读全文
posted @ 2020-02-13 12:58 6+0 阅读(167) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 21 下一页