随笔分类 -  Pytorch

AI
摘要:1、工具下载 下载数据标记工具labellmg,github地址:https://github.com/tzutalin/labelImg 2、依赖安装 3、在虚拟环境下运行一下代码,在libs文件夹下生成resources.py pyrcc5 -o .\libs\resources.py .\re 阅读全文
posted @ 2024-12-19 17:32 星空28 阅读(1069) 评论(0) 推荐(0)
摘要:1、开源OCR数据集生成项目TextRecognitionDataGenerator 该项目通过 Python实现,可以通过 pip 安装: 终端: pip install trdg 进入文件夹,安装requirementspip install -r requirements.txt 安装完成 进 阅读全文
posted @ 2024-12-17 18:04 星空28 阅读(195) 评论(0) 推荐(0)
摘要:1、查看CUDA版本 -->打开cmd -->查看CUDA版本 nvidia-smi ![](https://img2024.cnblogs.com/blog/3437857/202412/3437857-20241217115657975-986317706.jpg) 2、找到CUDA版本对应的t 阅读全文
posted @ 2024-12-17 11:59 星空28 阅读(107) 评论(0) 推荐(0)
摘要:方式一:手动实现 """ drop out随机丢弃神经元 """ import torch from torch import nn from d2l import torch as d2l import torch import torchvision from torch.utils impor 阅读全文
posted @ 2024-11-07 11:44 星空28 阅读(35) 评论(0) 推荐(0)
摘要:""" 模型选择,欠拟合、过拟合 """ import math import numpy as np import torch from d2l import torch as d2l from IPython import display import matplotlib.pyplot as 阅读全文
posted @ 2024-11-06 13:53 星空28 阅读(35) 评论(0) 推荐(0)
摘要:方法一: """ 多层感知机简单实现Fashion-MNIST分类,从零开始实现 """ import torch import torchvision from torch.utils import data from torchvision import transforms from d2l 阅读全文
posted @ 2024-11-04 12:05 星空28 阅读(74) 评论(0) 推荐(0)
摘要:实现方式一:手动实现 # Fashion-MNIST分类 import torch import torchvision from torch.utils import data from torchvision import transforms from d2l import torch as 阅读全文
posted @ 2024-10-31 11:15 星空28 阅读(86) 评论(0) 推荐(0)
摘要:参考: https://xiaodu.io/ctc-explained/ https://zhuanlan.zhihu.com/p/43534801 阅读全文
posted @ 2024-10-07 16:26 星空28 阅读(19) 评论(0) 推荐(0)
摘要:utils.py import torch import matplotlib.pyplot as plt def plot_curve(data): fig = plt.figure() plt.plot(range(len(data)), data, color='blue') plt.lege 阅读全文
posted @ 2024-10-06 06:14 星空28 阅读(26) 评论(0) 推荐(0)
摘要:hub模块中有前人已经训练好的模型参数,可以根据情况调用 # hub模块:调用 # torch.hub.list('pytorch/vision:v0.10.0') # 使用前人已有的模型库 # https://github.com/pytorch/hub/blob/master/pytorch_v 阅读全文
posted @ 2024-10-05 14:49 星空28 阅读(69) 评论(0) 推荐(0)
摘要:简单线性回归 y = 2*x + 1 import numpy as np import torch import torch.nn as nn class LinearRegressionModel(nn.Module): def __init__(self, input_dim, output_ 阅读全文
posted @ 2024-10-05 13:10 星空28 阅读(78) 评论(0) 推荐(0)