Loading

上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页
摘要: import time # 计时:统计每轮/每次迭代耗时 from options.train_options import TrainOptions # 训练期命令行参数解析器(继承 BaseOptions 并添加训练相关项) from data import create_dataset # 工 阅读全文
posted @ 2025-09-25 16:37 SaTsuki26681534 阅读(42) 评论(0) 推荐(0)
摘要: """This module contains simple helper functions""" # ↑ 模块文档字符串:本文件包含一些简单的辅助函数(图像/张量转换、保存、目录创建等) from __future__ import print_function # 兼容旧版 Python 的 阅读全文
posted @ 2025-09-25 15:24 SaTsuki26681534 阅读(15) 评论(0) 推荐(0)
摘要: 前言:关于util包 在深度学习模型项目中,util 文件夹(通常是 "utility" 的缩写)主要用于存放通用工具函数、辅助类或跨模块复用的功能代码,目的是减少代码冗余、提高复用性,并使项目结构更清晰。 其包含的文件通常围绕项目中多个模块(如训练、测试、数据处理、模型构建等)都会用到的共性功能展 阅读全文
posted @ 2025-09-25 15:15 SaTsuki26681534 阅读(22) 评论(0) 推荐(0)
摘要: cycleGAN模型结构图 import torch # 深度学习主库 import itertools # 提供链式迭代等工具(这里用于把多个参数迭代器拼接) from util.image_pool import ImagePool # 用于判别器的“历史假样本缓存”,提高训练稳定性 from 阅读全文
posted @ 2025-09-24 22:01 SaTsuki26681534 阅读(26) 评论(0) 推荐(0)
摘要: import torch import torch.nn as nn from torch.nn import init import functools from torch.optim import lr_scheduler ################################### 阅读全文
posted @ 2025-09-24 21:29 SaTsuki26681534 阅读(14) 评论(0) 推荐(0)
摘要: import os # 标准库:操作系统相关(本文件中未直接使用) import torch # PyTorch 主库 from pathlib import Path # 处理路径 from collections import OrderedDict # 有序字典:用于按固定顺序组织可视化/损失 阅读全文
posted @ 2025-09-24 16:40 SaTsuki26681534 阅读(11) 评论(0) 推荐(0)
摘要: """This package contains modules related to objective functions, optimizations, and network architectures. To add a custom model class called 'dummy', 阅读全文
posted @ 2025-09-24 16:24 SaTsuki26681534 阅读(11) 评论(0) 推荐(0)
摘要: """A modified image folder class We modify the official PyTorch image folder (https://github.com/pytorch/vision/blob/master/torchvision/datasets/folde 阅读全文
posted @ 2025-09-24 16:07 SaTsuki26681534 阅读(14) 评论(0) 推荐(0)
摘要: """This module implements an abstract base class (ABC) 'BaseDataset' for datasets. It also includes common transformation functions (e.g., get_transfo 阅读全文
posted @ 2025-09-24 14:56 SaTsuki26681534 阅读(14) 评论(0) 推荐(0)
摘要: # 默认的dataset_mode值是unaligned,所以只学一下UnalignedDataset的文件 import os # 路径处理库 from data.base_dataset import BaseDataset, get_transform # 从自定义模块导入 BaseDatas 阅读全文
posted @ 2025-09-24 10:14 SaTsuki26681534 阅读(23) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页