generated from xinetzone/xyzstyle
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liuxinwei
committed
Dec 4, 2024
1 parent
375eb46
commit 00ed4a7
Showing
113 changed files
with
1,338 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,3 +161,4 @@ __pycache__/ | |
*.npz | ||
*.torchscript | ||
*.engine | ||
work_dirs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# DIV2K 数据\n", | ||
"\n", | ||
"[DIV2K 数据集](https://data.vision.ee.ethz.ch/cvl/DIV2K/)是广泛用于图像超分辨率(Super-Resolution, SR)研究的高质量图像数据集。它由2K分辨率的图像组成,提供了高分辨率(HR)图像和相应的低分辨率(LR)图像,用于训练和测试超分辨率算法。\n", | ||
"\n", | ||
"## 数据集概述\n", | ||
"\n", | ||
"- **名称**:DIV2K\n", | ||
"- **全称**:DIVerse 2K resolution high quality images\n", | ||
"- **发布者**:NTIRE(New Trends in Image Restoration and Enhancement)Workshop\n", | ||
"- **发布年份**:2017\n", | ||
"- **用途**:图像超分辨率研究\n", | ||
"\n", | ||
"### 数据集组成\n", | ||
"\n", | ||
"DIV2K 数据集包含以下部分:\n", | ||
"\n", | ||
"1. **训练集**:\n", | ||
" - 800张高分辨率(HR)图像。\n", | ||
" - 对应的低分辨率(LR)图像,通过不同的降采样方法生成(如双三次插值、双线性插值等)。\n", | ||
"\n", | ||
"2. **验证集**:\n", | ||
" - 100张高分辨率(HR)图像。\n", | ||
" - 对应的低分辨率(LR)图像。\n", | ||
"\n", | ||
"3. **测试集**:\n", | ||
" - 100张高分辨率(HR)图像。\n", | ||
" - 对应的低分辨率(LR)图像。\n", | ||
"\n", | ||
"### 数据集特点\n", | ||
"\n", | ||
"- **高分辨率**:所有图像的分辨率为2K(2048x1080或类似分辨率)。\n", | ||
"- **多样性**:图像内容多样,包括自然场景、人像、建筑、纹理等。\n", | ||
"- **高质量**:图像质量高,适合用于训练和评估超分辨率算法。" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "ai", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.12.7" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 计算机视觉数据 | ||
|
||
```{toctree} | ||
DIV2K | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 数据集 | ||
|
||
```{toctree} | ||
cv/index | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Captum | ||
|
||
[Captum](https://captum.ai/)(拉丁语中意为“理解”)是开源的、可扩展的库,基于 PyTorch 构建模型的解释性。随着模型复杂度的增加以及由此带来的透明度缺失,模型解释方法变得越来越重要。无论是在研究领域还是在使用机器学习的各个行业中的实际应用方面,理解模型都成为了活跃的研究主题和关注焦点。Captum 提供了最先进的算法,包括集成梯度法,以便研究人员和开发者能够轻松理解哪些特征对模型输出有所贡献。 | ||
|
||
Captum 帮助机器学习研究者更容易地实现可以与 PyTorch 模型交互的解释性算法。它还允许研究人员快速将他们的工作与库中其他现有算法进行基准对比。对于模型开发者来说,Captum 可以用来通过促进识别不同特征来改进和排查模型,这些特征有助于模型的输出,从而设计出更好的模型并解决意外的模型输出问题。 | ||
|
||
## 目标受众 | ||
|
||
Captum 的主要受众是那些希望改进其模型并了解哪些特征重要的模型开发者,以及专注于识别能够更好地解释多种类型模型的算法的解释性研究者。 | ||
|
||
Captum 也可以被使用训练有素模型进行生产的应用程序工程师所使用。Captum 通过提高模型的解释性,提供了更简单的故障排除方式,并有可能向最终用户更好地解释为什么他们会看到特定的内容,例如电影推荐。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# ExecuTorch | ||
|
||
[ExecuTorch](https://pytorch.org/executorch/stable/index.html) 平台提供了基础设施,使 PyTorch 程序能够从增强现实/虚拟现实可穿戴设备到标准的 iOS 和 Android 移动设备上运行。 ExecuTorch 的主要目标之一是增强 PyTorch 程序的自定义和部署能力。 | ||
|
||
ExecuTorch 高度依赖于 PyTorch 技术,如 {func}`torch.compile` 和 {func}`torch.export`。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# LightlySSL | ||
|
||
[LightlySSL](https://docs.lightly.ai/self-supervised-learning/) 是用于自监督学习的计算机视觉框架。 | ||
|
||
通过 LightlySSL,您可以使用自监督的方式训练深度学习模型。这意味着您无需任何标签即可进行模型训练。LightlySSL 旨在帮助您理解和处理大型无标注数据集。它是基于 PyTorch 构建的,因此与 Fast.ai 等其他框架完全兼容。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# OpenMMLab | ||
|
||
项目初始化 `cd ../../tests && . init_openmmlab.sh` | ||
|
||
```{toctree} | ||
mmengine/index | ||
mmagic/index | ||
mmdesign/index | ||
``` |
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# PyTorchVideo | ||
|
||
[PyTorchVideo](https://pytorchvideo.org/) 是开源的视频理解库,它提供了最新的构建器,用于最先进的视频理解主干、层、头部和损失函数,以应对不同的任务。这些任务包括声学事件检测、动作识别(视频分类)、动作检测(视频检测)、多模态理解(声音视觉分类)以及自监督学习。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Ray | ||
|
||
[Ray](https://docs.ray.io/en/latest/index.html) 是开源的统一框架,用于扩展 AI 和 Python 应用程序,例如机器学习。它提供了并行处理的计算层,因此您无需成为分布式系统专家。Ray 通过以下组件最小化了运行分布式个体和端到端机器学习工作流程的复杂性: | ||
|
||
- 可扩展的库,用于常见的机器学习任务,如数据预处理、分布式训练、超参数调整、强化学习和模型服务。 | ||
- Pythonic 分布式计算原语,用于并行化和扩展 Python 应用程序。 | ||
- 集成和实用工具,用于将 Ray 集群与现有工具和基础设施(如 Kubernetes、AWS、GCP 和 Azure)集成和部署。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Renate | ||
|
||
[Renate](https://renate.readthedocs.io/en/latest/) Python 包,用于自动重新训练神经网络模型。它采用先进的持续学习和终身学习算法来实现这一目标。其实现基于 PyTorch 和 Lightning 进行深度学习,以及使用 [Syne Tune](https://github.com/awslabs/syne-tune) 进行超参数优化。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# TorchDrug | ||
|
||
[TorchDrug](https://torchdrug.ai/) 是专为药物发现设计的机器学习平台,它融合了图机器学习(包括图神经网络、几何深度学习和知识图谱)、深度生成模型以及强化学习等多种技术。该平台提供了全面而灵活的接口,支持在 PyTorch 中快速构建药物发现模型原型。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# TorchIO | ||
|
||
[TorchIO](https://torchio.readthedocs.io/index.html) 是开源的 Python 库,用于深度学习中3D医学图像的有效加载、预处理、增强和基于区块的采样,该库遵循 PyTorch 的设计。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# TorchOpt | ||
|
||
[TorchOpt](https://torchopt.readthedocs.io/en/latest/index.html) 是基于 PyTorch 构建的高效可微分优化库。TorchOpt 具有以下特点: | ||
|
||
- 全面性:TorchOpt 提供了三种不同的微分模式——显式微分、隐式微分和零阶微分,以应对不同的可微分优化情境。 | ||
- 灵活性:TorchOpt 为用户提供了函数式和面向对象两种 API 风格,以满足用户的不同偏好。用户可以选择类似 JAX 或 PyTorch 的风格来实现可微分优化。 | ||
- 高效性:TorchOpt 提供了(1)CPU/GPU加速的可微分优化器;(2)基于RPC的分布式训练框架;(3)快速树操作,这些功能极大地提高了双层优化问题的训练效率。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# depyf | ||
|
||
在了解 [`depyf`](https://depyf.readthedocs.io/en/latest/) 的使用方法之前,推荐您先阅读 [`torch.compile` 示例教程](walk-through),以便理解 `depyf` 如何帮助您。 | ||
|
||
`depyf` 旨在解决 {func}`torch.compile` 的两个痛点: | ||
|
||
1. {func}`torch.compile` 转换 Python 字节码,但很少有开发者能读懂 Python 字节码(除非你的大脑里有一台堆栈机……),从而理解发生了什么。`depyf` 帮助将转换后的字节码反编译回 Python 源代码,使开发者能够理解 {func}`torch.compile` 是如何转换他们的代码的。这极大地帮助用户调整他们的代码以适应 {func}`torch.compile`,使他们能够编写对 {func}`torch.compile` 友好的代码。 | ||
2. {func}`torch.compile` 动态生成许多函数,这些函数只能作为黑盒子运行。用户无法逐行调试代码。`depyf` 帮助将源代码导出到文件中,并将这些函数与源代码文件链接起来,这样用户就可以使用调试器逐行调试这些函数了。这极大地帮助用户理解 {func}`torch.compile` 并在训练过程中调试如 `NaN` 等问题。 | ||
|
||
采用从教程示例中的工作流程:![](https://depyf.readthedocs.io/en/latest/_images/dynamo-workflow-with-depyf.svg) | ||
|
||
`depyf` 有助于: | ||
|
||
- 提供上述工作流程的源代码描述,以便用户能够轻松理解。(实际的工作流程发生在 C 语言中,并在 CPython 解释器内进行,提供 Python 源代码描述的工作流程,以便用户可以更容易地理解。) | ||
- 生成转换后的字节码和恢复函数的源代码。 | ||
- 将计算图计算函数与磁盘上的代码链接起来,以便调试器可以逐步执行代码。 | ||
|
||
`depyf` 的主要用途涉及两个上下文管理器,建议在调试器中启动脚本: | ||
|
||
```python | ||
import torch | ||
|
||
@torch.compile | ||
def function(inputs): | ||
x = inputs["x"] | ||
y = inputs["y"] | ||
x = x.cos().cos() | ||
if x.mean() > 0.5: | ||
x = x / 1.1 | ||
return x * y | ||
|
||
shape_10_inputs = {"x": torch.randn(10, requires_grad=True), "y": torch.randn(10, requires_grad=True)} | ||
shape_8_inputs = {"x": torch.randn(8, requires_grad=True), "y": torch.randn(8, requires_grad=True)} | ||
|
||
import depyf | ||
with depyf.prepare_debug("./debug_dir"): | ||
# warmup | ||
for i in range(100): | ||
output = function(shape_10_inputs) | ||
output = function(shape_8_inputs) | ||
# the program will pause here for you to set breakpoints | ||
# then you can hit breakpoints when running the function | ||
with depyf.debug(): | ||
output = function(shape_10_inputs) | ||
``` | ||
|
||
第一个上下文管理器 {func}`depyf.prepare_debug` 接受一个目录路径作为参数,用于将所有源代码转储至该目录。在这个上下文管理器中,PyTorch 的所有内部细节将被 `depyf` 挂钩,它会自动为你转储必要的源代码。 | ||
|
||
第二个上下文管理器 {func}`depyf.debug` 无需任何参数,它仅禁用新的编译条目。一旦进入此上下文管理器,程序将会暂停,你可以浏览指定目录下(本例中为 `"./debug_dir"`)的所有源代码。入口文件是 `full_code_for_xxx.py`。你可以在这些文件中设置断点。最重要的是,你在这个上下文管理器下设置的断点可以被命中。你可以逐行调试代码,以排查可能的 `NaN` 值或理解你的代码发生了什么。 | ||
|
||
下图展示了 `depyf` 的两个典型用法,并列出了所有生成的文件。![](https://depyf.readthedocs.io/en/latest/_images/usage.svg) | ||
|
||
```{toctree} | ||
:hidden: | ||
walk-through | ||
``` |
Oops, something went wrong.