- 博客(6)
- 收藏
- 关注
原创 小试牛刀——pytorch实现ResNet34网络
书上的,很抽象from torch import nnfrom torch.nn import functional as Fimport osimport torchvisionclass ResidualBlock(nn.Module): def __init__(self, inchannel, outchannel, stride=1, shortcut=None...
2018-07-31 09:02:05 1915 1
原创 小试牛刀——线性回归
深度学习框架中的小例子import torch as tfrom matplotlib import pyplot as pltt.manual_seed(1000)def get_fake_data(batch_size=8): x = t.rand(batch_size, 1) * 20 #x为(8,1)的torch y = x * 2 + (1 + t.r...
2018-07-27 17:42:58 516
原创 python读取xml信息和图片,用cv2标注图片
import osimport xml.dom.minidomimport cv2 as cvImgPath = '/home/newbee/CODEs/CSRNet-pytorch-master/train/images/'AnnoPath = '/home/newbee/CODEs/CSRNet-pytorch-master/train/xmls/'imagelist = os...
2018-07-25 16:30:17 4780 3
原创 小试牛刀——pytorch实现小猫小狗分类
# -*- coding: utf-8 -*-__author__ = 'cui'import torchimport torchvisionfrom PIL import Imageimport numpy as npfrom torchvision import transforms as Tclass_dict = {0: 'tench, Tinca tinca', ...
2018-07-19 14:17:56 2844
原创 Pytorch安装历程
1.首先需要安装一个anaconda3(可以到清华镜像中去下载,方便)2.创建虚拟环境为了避免与电脑中已存在的环境中发生冲突,新建一个虚拟环境,具体步骤参见https://blog.csdn.net/lyy14011305/article/details/59500819?ticket=ST-54761-uVouyW9tXaHgviR7YENY-passport.csdn.net,打开An...
2018-07-17 13:01:53 206
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人