分类 Share 下的文章

Pytorch 分类网络实例


TransformsData does not always come in its final processed form that is required for training machine learning algorithms. We use transforms to perform some manipulation of the data and make it suitable for training.All TorchVision datasets have two parameters -transform to modify the features and target_transform to modify the labels - that accept callables containing the transform...

Dataset&DataLoader


dataset需要实现def __getitem__(self, index) -> T_co: # 基于一个索引返回一个训练样本(x, y)构成的训练对 raise NotImplementedError("Subclasses of Dataset should implement __getitem__.") def __len__(self): # 将数据放进去,返回数据总大小 return len(self.img_labels) return self.tensors[0].size(0)import os import pandas as pd from torchvision.io import read_image # 从磁盘中读取训练数据、__getitem__中能够根据idx返回相对...

TORCH.GATHER


torch.gather(input, dim, index, *, sparse_grad=False, out=None) → [Tensor]Gathers values along an axis specified by dim.Parametersinput (Tensor) – the source tensordim (int) – the axis along which to indexindex (LongTensor) – the indices of elements to gatherKeyword Argumentssparse_grad (bool, optional) – If True, gradient w.r.t. input will be a sparse tensor.out (Tensor, optional) ...

自建中继使用RustDesk


服务端搭建中继服务器推荐使用linux来搭建中继服务器,且有公网ip使用宝塔面板# Xshell连接服务器…… cd /root mkdir rustdesk cd rustdesk wgethttps://github.com/rustdesk/rustdesk-server/releases/download/1.1.6/rustdesk-server-linux-x64.zip unzip rustdesk-server-linux-x64.zip ls 查看有无hbbr和hbbs两份文件hbbr:通常用于建立连接。它可能是一种服务端应用程序,负责接受客户端的连接请求,验证客户端身份,并建立起双向通信的连接。在某些情况下,hbbr 可能充当中继服务器或者数据交换的中心节点。hbbs:通常用于传输数据。它可能是一种客户端应用程序,负责向 hbbr 或其他服...

小米Ruby 15.6扩充内存至双通道16GB


背景: 大一上学期,参加了YouthOl的程序部的学习,经过一个学期的洗礼,我最终被师傅破格纳入正式成员,当时很是激动。第一次例会结束后,师傅QQ联系了 我,说了我的一些情况,当时我心凉了半截,心想这下得好好追赶了~此处省略五万字~应该是上学期快结束的时候,买了一台笔记本,之前吧,呃,程序部发的作业,我都是去机房或者图书馆的电脑室里做的,用的360浏览器,我真是栓Q,那电脑真是卡的一批,刚开机五分钟之内你不能操作~可能有些夸张,但也差不多。我就是在这样的条件下,艰难的通过了一次次的作业,最终被师傅破格纳入,说多了都是泪~话说我师傅真是我的贵人,没有他我不可能转专业,不可认识那些可爱的同事,虽然大部分仅限于自己的部门,但是大家庭还是很友好滴~这都正式成员了,再不买电脑怎对得起程序部这个部门呢,于是就瞎挑,挑了一个小米Ruby 15.6英寸,CPU是i5-8250...

召唤看板娘