提交 5603c843 编写于 作者: 片刻小哥哥's avatar 片刻小哥哥

优化整个脚本,修复各个版本,编辑正常跳转

上级 9b71cae8
...@@ -6,14 +6,14 @@ ...@@ -6,14 +6,14 @@
<br/> <br/>
<table> <table>
<tr align="center"> <tr align="center">
<td><a title="Pytorch 1.0 中文版本" href="https://pytorch.apachecn.org/docs/1.0/" target="_blank">Pytorch 1.0 中文版本 <br/> <img width="500" src="docs/img/logo.svg"></a></td> <td><a title="Pytorch 1.0 中文版本" href="https://pytorch.apachecn.org/docs/1.0/" target="_blank"><font size="5">1.0 中文版本</font></a></td>
<td><a title="Pytorch 最新 英文教程" href="https://pytorch.org/tutorials/" target="_blank">Pytorch 最新 英文教程 <br/> <img width="500" src="docs/img/logo.svg"></a></td> <td><a title="Pytorch 最新 英文教程" href="https://pytorch.org/tutorials/" target="_blank"><font size="5">最新 英文教程</font></a></td>
<td><a title="Pytorch 最新 英文文档" href="https://pytorch.org/docs/stable/index.html" target="_blank">Pytorch 最新 英文文档 <br/> <img width="500" src="docs/img/logo.svg"></a></td> <td><a title="Pytorch 最新 英文文档" href="https://pytorch.org/docs/stable/index.html" target="_blank"><font size="5">最新 英文文档</font></a></td>
</tr> </tr>
<tr align="center"> <tr align="center">
<td><a title="Pytorch 0.4 中文版本" href="https://pytorch.apachecn.org/docs/0.4/" target="_blank">Pytorch 0.4 中文版本 <br/> <img width="500" src="docs/img/logo.svg"></a></td> <td><a title="Pytorch 0.4 中文版本" href="https://pytorch.apachecn.org/docs/0.4/" target="_blank"><font size="5">0.4 中文版本</font></a></td>
<td><a title="Pytorch 0.3 中文版本" href="https://pytorch.apachecn.org/docs/0.3/" target="_blank">Pytorch 0.3 中文版本 <br/> <img width="500" src="docs/img/logo.svg"></a></td> <td><a title="Pytorch 0.3 中文版本" href="https://pytorch.apachecn.org/docs/0.3/" target="_blank"><font size="5">0.3 中文版本</font></a></td>
<td><a title="Pytorch 0.2 中文版本" href="https://pytorch.apachecn.org/docs/0.2/" target="_blank">Pytorch 0.2 中文版本 <br/> <img width="500" src="docs/img/logo.svg"></a></td> <td><a title="Pytorch 0.2 中文版本" href="https://pytorch.apachecn.org/docs/0.2/" target="_blank"><font size="5">0.2 中文版本</font></a></td>
</tr> </tr>
</table> </table>
<br/> <br/>
......
+ [PyTorch 0.2 中文文档](README.md) # Summary
+ 说明
+ [自动求导机制](notes/autograd.md) * [PyTorch 0.2 中文文档](README.md)
+ [CUDA语义](notes/cuda.md) * 说明
+ [扩展PyTorch](notes/extending.md) * [自动求导机制](notes/autograd.md)
+ [多进程最佳实践](notes/multiprocessing.md) * [CUDA语义](notes/cuda.md)
+ [序列化语义](notes/serialization.md) * [扩展PyTorch](notes/extending.md)
+ PACKAGE参考 * [多进程最佳实践](notes/multiprocessing.md)
+ [torch](package_references/torch.md) * [序列化语义](notes/serialization.md)
+ [torch.Tensor](package_references/Tensor.md) * PACKAGE参考
+ [torch.Storage](package_references/Storage.md) * [torch](package_references/torch.md)
+ [torch.nn](package_references/torch-nn.md) * [torch.Tensor](package_references/Tensor.md)
+ [torch.nn.functional](package_references/functional.md) * [torch.Storage](package_references/Storage.md)
+ [torch.autograd](package_references/torch-autograd.md) * [torch.nn](package_references/torch-nn.md)
+ [torch.optim](package_references/torch-optim.md) * [torch.nn.functional](package_references/functional.md)
+ [torch.nn.init](package_references/nn_init.md) * [torch.autograd](package_references/torch-autograd.md)
+ [torch.multiprocessing](package_references/torch-multiprocessing.md) * [torch.optim](package_references/torch-optim.md)
+ [torch.legacy](package_references/legacy.md) * [torch.nn.init](package_references/nn_init.md)
+ [torch.cuda](package_references/torch-cuda.md) * [torch.multiprocessing](package_references/torch-multiprocessing.md)
+ [torch.utils.ffi](package_references/ffi.md) * [torch.legacy](package_references/legacy.md)
+ [torch.utils.data](package_references/data.md) * [torch.cuda](package_references/torch-cuda.md)
+ [torch.utils.model_zoo](package_references/model_zoo.md) * [torch.utils.ffi](package_references/ffi.md)
+ TORCHVISION参考 * [torch.utils.data](package_references/data.md)
+ [torchvision](torchvision/torchvision.md) * [torch.utils.model_zoo](package_references/model_zoo.md)
+ [torchvision.datasets](torchvision/torchvision-datasets.md) * TORCHVISION参考
+ [torchvision.models](torchvision/torchvision-models.md) * [torchvision](torchvision/torchvision.md)
+ [torchvision.transforms](torchvision/torchvision-transform.md) * [torchvision.datasets](torchvision/torchvision-datasets.md)
+ [torchvision.utils](torchvision/torchvision-utils.md) * [torchvision.models](torchvision/torchvision-models.md)
+ [致谢](acknowledgement.md) * [torchvision.transforms](torchvision/torchvision-transform.md)
* [torchvision.utils](torchvision/torchvision-utils.md)
* [致谢](acknowledgement.md)
{
"title" : "Pytorch 中文文档",
"author" : "ApacheCN",
"description" : "Pytorch 中文文档: 教程和文档",
"language" : "zh-hans",
"plugins": [
"github",
"github-buttons",
"-sharing",
"insert-logo",
"sharing-plus",
"back-to-top-button",
"code",
"copy-code-button",
"mathjax",
"pageview-count",
"edit-link",
"emphasize",
"alerts",
"auto-scroll-table",
"popup",
"hide-element",
"page-toc-button",
"tbfed-pagefooter",
"ga",
"baidu",
"sitemap"
],
"pluginsConfig": {
"github": {
"url": "https://github.com/apachecn"
},
"github-buttons": {
"repo": "apachecn/pytorch-doc-zh",
"types": [
"star",
"watch",
"fork"
],
"size": "small"
},
"insert-logo": {
"url": "http://data.apachecn.org/img/logo.jpg",
"style": "background: none; max-height: 150px; min-height: 150px"
},
"hide-element": {
"elements": [".gitbook-link"]
},
"edit-link": {
"base": "https://github.com/apachecn/pytorch-doc-zh/blob/master/docs/0.2",
"label": "编辑本页"
},
"sharing": {
"qzone": true,
"weibo": true,
"twitter": false,
"facebook": false,
"google": false,
"qq": false,
"line": false,
"whatsapp": false,
"douban": false,
"all": [
"qq", "douban", "facebook", "google", "linkedin", "twitter", "weibo", "whatsapp"
]
},
"page-toc-button": {
"maxTocDepth": 4,
"minTocSize": 4
},
"tbfed-pagefooter": {
"copyright":"Copyright &copy ibooker.org.cn 2019",
"modify_label": "该文件修订时间: ",
"modify_format": "YYYY-MM-DD HH:mm:ss"
},
"ga": {
"token": "UA-102475051-10"
},
"baidu": {
"token": "75439e2cbd22bdd813226000e9dcc12f"
},
"sitemap": {
"hostname": "http://pytorch.apachecn.org"
}
},
"my_links" : {
"sidebar" : {
"Home" : "https://www.baidu.com"
}
},
"my_plugins": [
"splitter",
"donate",
"search-pro",
"todo",
"-lunr",
"-search",
"expandable-chapters-small",
"chapter-fold",
"expandable-chapters",
"expandable-chapters-small",
"back-to-top-button",
"advanced-emoji",
"tbfed-pagefooter",
"sectionx",
"page-treeview",
"simple-page-toc",
"github-buttons",
"ancre-navigation"
],
"my_pluginsConfig": {
"ignores": ["node_modules"],
"simple-page-toc": {
"maxDepth": 3,
"skipFirstH1": true
},
"page-toc-button": {
"maxTocDepth": 2,
"minTocSize": 2
},
"page-treeview": {
"copyright": "Copyright &#169; aleen42",
"minHeaderCount": "2",
"minHeaderDeep": "2"
},
"donate": {
"wechat": "微信收款的二维码URL",
"alipay": "支付宝收款的二维码URL",
"title": "",
"button": "赏",
"alipayText": "支付宝打赏",
"wechatText": "微信打赏"
},
"page-copyright": {
"description": "modified at",
"signature": "你的签名",
"wisdom": "Designer, Frontend Developer & overall web enthusiast",
"format": "YYYY-MM-dd hh:mm:ss",
"copyright": "Copyright &#169; 你的名字",
"timeColor": "#666",
"copyrightColor": "#666",
"utcOffset": "8",
"style": "normal",
"noPowered": false
}
}
}
\ No newline at end of file
+ [PyTorch 0.3 中文文档 & 教程](README.md) # Summary
+ [中文教程](tut.md)
+ [初学者教程](beginner_tutorials.md) * [PyTorch 0.3 中文文档 & 教程](README.md)
+ [PyTorch 深度学习: 60 分钟极速入门教程](deep_learning_60min_blitz.md) * [中文教程](tut.md)
+ [PyTorch 是什么?](blitz_tensor_tutorial.md) * [初学者教程](beginner_tutorials.md)
+ [自动求导: 自动微分](blitz_autograd_tutorial.md) * [PyTorch 深度学习: 60 分钟极速入门教程](deep_learning_60min_blitz.md)
+ [神经网络](blitz_neural_networks_tutorial.md) * [PyTorch 是什么?](blitz_tensor_tutorial.md)
+ [训练一个分类器](blitz_cifar10_tutorial.md) * [自动求导: 自动微分](blitz_autograd_tutorial.md)
+ [可选: 数据并行](blitz_data_parallel_tutorial.md) * [神经网络](blitz_neural_networks_tutorial.md)
+ [PyTorch for former Torch users](former_torchies_tutorial.md) * [训练一个分类器](blitz_cifar10_tutorial.md)
+ [Tensors](former_torchies_tensor_tutorial.md) * [可选: 数据并行](blitz_data_parallel_tutorial.md)
+ [Autograd (自动求导)](former_torchies_autograd_tutorial.md) * [PyTorch for former Torch users](former_torchies_tutorial.md)
+ [nn package](former_torchies_nn_tutorial.md) * [Tensors](former_torchies_tensor_tutorial.md)
+ [Multi-GPU examples](former_torchies_parallelism_tutorial.md) * [Autograd (自动求导)](former_torchies_autograd_tutorial.md)
+ [跟着例子学习 PyTorch](pytorch_with_examples.md) * [nn package](former_torchies_nn_tutorial.md)
+ [Warm-up: numpy](pytorch_with_examples_warm-up-numpy.md) * [Multi-GPU examples](former_torchies_parallelism_tutorial.md)
+ [PyTorch: Tensors](pytorch_with_examples_pytorch-tensors.md) * [跟着例子学习 PyTorch](pytorch_with_examples.md)
+ [PyTorch: 变量和autograd](pytorch_with_examples_pytorch-variables-and-autograd.md) * [Warm-up: numpy](pytorch_with_examples_warm-up-numpy.md)
+ [PyTorch: 定义新的autograd函数](pytorch_with_examples_pytorch-defining-new-autograd-functions.md) * [PyTorch: Tensors](pytorch_with_examples_pytorch-tensors.md)
+ [TensorFlow: 静态图](pytorch_with_examples_tensorflow-static-graphs.md) * [PyTorch: 变量和autograd](pytorch_with_examples_pytorch-variables-and-autograd.md)
+ [PyTorch: nn包](pytorch_with_examples_pytorch-nn.md) * [PyTorch: 定义新的autograd函数](pytorch_with_examples_pytorch-defining-new-autograd-functions.md)
+ [PyTorch: optim包](pytorch_with_examples_pytorch-optim.md) * [TensorFlow: 静态图](pytorch_with_examples_tensorflow-static-graphs.md)
+ [PyTorch: 定制化nn模块](pytorch_with_examples_pytorch-custom-nn-modules.md) * [PyTorch: nn包](pytorch_with_examples_pytorch-nn.md)
+ [PyTorch: 动态控制流程 + 权重共享](pytorch_with_examples_pytorch-control-flow-weight-sharing.md) * [PyTorch: optim包](pytorch_with_examples_pytorch-optim.md)
+ [迁移学习教程](transfer_learning_tutorial.md) * [PyTorch: 定制化nn模块](pytorch_with_examples_pytorch-custom-nn-modules.md)
+ [数据加载和处理教程](data_loading_tutorial.md) * [PyTorch: 动态控制流程 + 权重共享](pytorch_with_examples_pytorch-control-flow-weight-sharing.md)
+ [针对NLP的Pytorch深度学习](deep_learning_nlp_tutorial.md) * [迁移学习教程](transfer_learning_tutorial.md)
+ [PyTorch介绍](nlp_pytorch_tutorial.md) * [数据加载和处理教程](data_loading_tutorial.md)
+ [PyTorch深度学习](nlp_deep_learning_tutorial.md) * [针对NLP的Pytorch深度学习](deep_learning_nlp_tutorial.md)
+ [词汇嵌入:编码词汇语义](nlp_word_embeddings_tutorial.md) * [PyTorch介绍](nlp_pytorch_tutorial.md)
+ [序列模型和 LSTM 网络(长短记忆网络)](nlp_sequence_models_tutorial.md) * [PyTorch深度学习](nlp_deep_learning_tutorial.md)
+ [高级教程: 作出动态决策和 Bi-LSTM CRF](nlp_advanced_tutorial.md) * [词汇嵌入:编码词汇语义](nlp_word_embeddings_tutorial.md)
+ [中级教程](intermediate_tutorials.md) * [序列模型和 LSTM 网络(长短记忆网络)](nlp_sequence_models_tutorial.md)
+ [用字符级RNN分类名称](char_rnn_classification_tutorial.md) * [高级教程: 作出动态决策和 Bi-LSTM CRF](nlp_advanced_tutorial.md)
+ [基与字符级RNN(Char-RNN)的人名生成](char_rnn_generation_tutorial.md) * [中级教程](intermediate_tutorials.md)
+ [用基于注意力机制的seq2seq神经网络进行翻译](seq2seq_translation_tutorial.md) * [用字符级RNN分类名称](char_rnn_classification_tutorial.md)
+ [强化学习(DQN)教程](reinforcement_q_learning.md) * [基与字符级RNN(Char-RNN)的人名生成](char_rnn_generation_tutorial.md)
+ [Writing Distributed Applications with PyTorch](dist_tuto.md) * [用基于注意力机制的seq2seq神经网络进行翻译](seq2seq_translation_tutorial.md)
+ [空间转换网络 (Spatial Transformer Networks) 教程](spatial_transformer_tutorial.md) * [强化学习(DQN)教程](reinforcement_q_learning.md)
+ [高级教程](advanced_tutorials.md) * [Writing Distributed Applications with PyTorch](dist_tuto.md)
+ [用 PyTorch 做 神经转换 (Neural Transfer)](neural_style_tutorial.md) * [空间转换网络 (Spatial Transformer Networks) 教程](spatial_transformer_tutorial.md)
+ [使用 numpy 和 scipy 创建扩展](numpy_extensions_tutorial.md) * [高级教程](advanced_tutorials.md)
+ [使用 ONNX 将模型从 PyTorch 迁移到 Caffe2 和 Mobile](super_resolution_with_caffe2.md) * [用 PyTorch 做 神经转换 (Neural Transfer)](neural_style_tutorial.md)
+ [为 pytorch 自定义 C 扩展](c_extension.md) * [使用 numpy 和 scipy 创建扩展](numpy_extensions_tutorial.md)
+ [中文文档](doc.md) * [使用 ONNX 将模型从 PyTorch 迁移到 Caffe2 和 Mobile](super_resolution_with_caffe2.md)
+ [介绍](notes.md) * [为 pytorch 自定义 C 扩展](c_extension.md)
+ [自动求导机制](notes_autograd.md) * [中文文档](doc.md)
+ [广播语义](notes_broadcasting.md) * [介绍](notes.md)
+ [CUDA 语义](notes_cuda.md) * [自动求导机制](notes_autograd.md)
+ [扩展 PyTorch](notes_extending.md) * [广播语义](notes_broadcasting.md)
+ [多进程的最佳实践](notes_multiprocessing.md) * [CUDA 语义](notes_cuda.md)
+ [序列化语义](notes_serialization.md) * [扩展 PyTorch](notes_extending.md)
+ [Package 参考](package_reference.md) * [多进程的最佳实践](notes_multiprocessing.md)
+ [torch](torch.md) * [序列化语义](notes_serialization.md)
+ [torch.Tensor](tensors.md) * [Package 参考](package_reference.md)
+ [torch.sparse](sparse.md) * [torch](torch.md)
+ [torch.Storage](storage.md) * [torch.Tensor](tensors.md)
+ [torch.nn](nn.md) * [torch.sparse](sparse.md)
+ [torch.optim](optim.md) * [torch.Storage](storage.md)
+ [Automatic differentiation package - torch.autograd](autograd.md) * [torch.nn](nn.md)
+ [Probability distributions - torch.distributions](distributions.md) * [torch.optim](optim.md)
+ [Multiprocessing package - torch.multiprocessing](multiprocessing.md) * [Automatic differentiation package - torch.autograd](autograd.md)
+ [Distributed communication package - torch.distributed](distributed.md) * [Probability distributions - torch.distributions](distributions.md)
+ [Legacy package - torch.legacy](legacy.md) * [Multiprocessing package - torch.multiprocessing](multiprocessing.md)
+ [torch.cuda](cuda.md) * [Distributed communication package - torch.distributed](distributed.md)
+ [torch.utils.ffi](ffi.md) * [Legacy package - torch.legacy](legacy.md)
+ [torch.utils.data](data.md) * [torch.cuda](cuda.md)
+ [torch.utils.model_zoo](model_zoo.md) * [torch.utils.ffi](ffi.md)
+ [torch.onnx](onnx.md) * [torch.utils.data](data.md)
+ [torchvision 参考](torchvision_reference.md) * [torch.utils.model_zoo](model_zoo.md)
+ [torchvision](torchvision.md) * [torch.onnx](onnx.md)
+ [torchvision.datasets](datasets.md) * [torchvision 参考](torchvision_reference.md)
+ [torchvision.models](models.md) * [torchvision](torchvision.md)
+ [torchvision.transforms](transforms.md) * [torchvision.datasets](datasets.md)
+ [torchvision.utils](utils.md) * [torchvision.models](models.md)
\ No newline at end of file * [torchvision.transforms](transforms.md)
* [torchvision.utils](utils.md)
{
"title" : "Pytorch 中文文档",
"author" : "ApacheCN",
"description" : "Pytorch 中文文档: 教程和文档",
"language" : "zh-hans",
"plugins": [
"github",
"github-buttons",
"-sharing",
"insert-logo",
"sharing-plus",
"back-to-top-button",
"code",
"copy-code-button",
"mathjax",
"pageview-count",
"edit-link",
"emphasize",
"alerts",
"auto-scroll-table",
"popup",
"hide-element",
"page-toc-button",
"tbfed-pagefooter",
"ga",
"baidu",
"sitemap"
],
"pluginsConfig": {
"github": {
"url": "https://github.com/apachecn"
},
"github-buttons": {
"repo": "apachecn/pytorch-doc-zh",
"types": [
"star",
"watch",
"fork"
],
"size": "small"
},
"insert-logo": {
"url": "http://data.apachecn.org/img/logo.jpg",
"style": "background: none; max-height: 150px; min-height: 150px"
},
"hide-element": {
"elements": [".gitbook-link"]
},
"edit-link": {
"base": "https://github.com/apachecn/pytorch-doc-zh/blob/master/docs/0.3",
"label": "编辑本页"
},
"sharing": {
"qzone": true,
"weibo": true,
"twitter": false,
"facebook": false,
"google": false,
"qq": false,
"line": false,
"whatsapp": false,
"douban": false,
"all": [
"qq", "douban", "facebook", "google", "linkedin", "twitter", "weibo", "whatsapp"
]
},
"page-toc-button": {
"maxTocDepth": 4,
"minTocSize": 4
},
"tbfed-pagefooter": {
"copyright":"Copyright &copy ibooker.org.cn 2019",
"modify_label": "该文件修订时间: ",
"modify_format": "YYYY-MM-DD HH:mm:ss"
},
"ga": {
"token": "UA-102475051-10"
},
"baidu": {
"token": "75439e2cbd22bdd813226000e9dcc12f"
},
"sitemap": {
"hostname": "http://pytorch.apachecn.org"
}
},
"my_links" : {
"sidebar" : {
"Home" : "https://www.baidu.com"
}
},
"my_plugins": [
"splitter",
"donate",
"search-pro",
"todo",
"-lunr",
"-search",
"expandable-chapters-small",
"chapter-fold",
"expandable-chapters",
"expandable-chapters-small",
"back-to-top-button",
"advanced-emoji",
"tbfed-pagefooter",
"sectionx",
"page-treeview",
"simple-page-toc",
"github-buttons",
"ancre-navigation"
],
"my_pluginsConfig": {
"ignores": ["node_modules"],
"simple-page-toc": {
"maxDepth": 3,
"skipFirstH1": true
},
"page-toc-button": {
"maxTocDepth": 2,
"minTocSize": 2
},
"page-treeview": {
"copyright": "Copyright &#169; aleen42",
"minHeaderCount": "2",
"minHeaderDeep": "2"
},
"donate": {
"wechat": "微信收款的二维码URL",
"alipay": "支付宝收款的二维码URL",
"title": "",
"button": "赏",
"alipayText": "支付宝打赏",
"wechatText": "微信打赏"
},
"page-copyright": {
"description": "modified at",
"signature": "你的签名",
"wisdom": "Designer, Frontend Developer & overall web enthusiast",
"format": "YYYY-MM-dd hh:mm:ss",
"copyright": "Copyright &#169; 你的名字",
"timeColor": "#666",
"copyrightColor": "#666",
"utcOffset": "8",
"style": "normal",
"noPowered": false
}
}
}
\ No newline at end of file
+ [PyTorch 0.4 中文文档](README.md) # Summary
+ [笔记](0.md)
+ [自动求导机制](1.md) * [PyTorch 0.4 中文文档](README.md)
+ [广播语义](2.md) * [笔记](0.md)
+ [CUDA语义](3.md) * [自动求导机制](1.md)
+ [扩展PyTorch](4.md) * [广播语义](2.md)
+ [常见问题](5.md) * [CUDA语义](3.md)
+ [多进程最佳实践](6.md) * [扩展PyTorch](4.md)
+ [序列化语义](7.md) * [常见问题](5.md)
+ [Windows 常见问题](8.md) * [多进程最佳实践](6.md)
+ [包参考](9.md) * [序列化语义](7.md)
+ [Torch](10.md) * [Windows 常见问题](8.md)
+ [torch.Tensor](11.md) * [包参考](9.md)
+ [Tensor Attributes](12.md) * [Torch](10.md)
+ [torch.sparse](13.md) * [torch.Tensor](11.md)
+ [torch.cuda](14.md) * [Tensor Attributes](12.md)
+ [torch.Storage](15.md) * [torch.sparse](13.md)
+ [torch.nn](16.md) * [torch.cuda](14.md)
+ [torch.nn.functional](17.md) * [torch.Storage](15.md)
+ [自动差异化包 - torch.autograd](18.md) * [torch.nn](16.md)
+ [torch.optim](19.md) * [torch.nn.functional](17.md)
+ [torch.nn.init](20.md) * [自动差异化包 - torch.autograd](18.md)
+ [torch.distributions](21.md) * [torch.optim](19.md)
+ [Multiprocessing包 - torch.multiprocessing](22.md) * [torch.nn.init](20.md)
+ [分布式通讯包 - torch.distributed](23.md) * [torch.distributions](21.md)
+ [torch.utils.bottleneck](24.md) * [Multiprocessing包 - torch.multiprocessing](22.md)
+ [torch.utils.checkpoint](25.md) * [分布式通讯包 - torch.distributed](23.md)
+ [torch.utils.cpp_extension](26.md) * [torch.utils.bottleneck](24.md)
+ [torch.utils.data](27.md) * [torch.utils.checkpoint](25.md)
+ [torch.utils.ffi](28.md) * [torch.utils.cpp_extension](26.md)
+ [torch.utils.model_zoo](29.md) * [torch.utils.data](27.md)
+ [torch.onnx](30.md) * [torch.utils.ffi](28.md)
+ [遗留包 - torch.legacy](31.md) * [torch.utils.model_zoo](29.md)
+ [torchvision 参考](32.md) * [torch.onnx](30.md)
+ [torchvision](33.md) * [遗留包 - torch.legacy](31.md)
+ [torchvision.datasets](34.md) * [torchvision 参考](32.md)
+ [torchvision.models](35.md) * [torchvision](33.md)
+ [torchvision.transform](36.md) * [torchvision.datasets](34.md)
+ [torchvision.utils](37.md) * [torchvision.models](35.md)
* [torchvision.transform](36.md)
* [torchvision.utils](37.md)
{
"title" : "Pytorch 中文文档",
"author" : "ApacheCN",
"description" : "Pytorch 中文文档: 教程和文档",
"language" : "zh-hans",
"plugins": [
"github",
"github-buttons",
"-sharing",
"insert-logo",
"sharing-plus",
"back-to-top-button",
"code",
"copy-code-button",
"mathjax",
"pageview-count",
"edit-link",
"emphasize",
"alerts",
"auto-scroll-table",
"popup",
"hide-element",
"page-toc-button",
"tbfed-pagefooter",
"ga",
"baidu",
"sitemap"
],
"pluginsConfig": {
"github": {
"url": "https://github.com/apachecn"
},
"github-buttons": {
"repo": "apachecn/pytorch-doc-zh",
"types": [
"star",
"watch",
"fork"
],
"size": "small"
},
"insert-logo": {
"url": "http://data.apachecn.org/img/logo.jpg",
"style": "background: none; max-height: 150px; min-height: 150px"
},
"hide-element": {
"elements": [".gitbook-link"]
},
"edit-link": {
"base": "https://github.com/apachecn/pytorch-doc-zh/blob/master/docs/0.4",
"label": "编辑本页"
},
"sharing": {
"qzone": true,
"weibo": true,
"twitter": false,
"facebook": false,
"google": false,
"qq": false,
"line": false,
"whatsapp": false,
"douban": false,
"all": [
"qq", "douban", "facebook", "google", "linkedin", "twitter", "weibo", "whatsapp"
]
},
"page-toc-button": {
"maxTocDepth": 4,
"minTocSize": 4
},
"tbfed-pagefooter": {
"copyright":"Copyright &copy ibooker.org.cn 2019",
"modify_label": "该文件修订时间: ",
"modify_format": "YYYY-MM-DD HH:mm:ss"
},
"ga": {
"token": "UA-102475051-10"
},
"baidu": {
"token": "75439e2cbd22bdd813226000e9dcc12f"
},
"sitemap": {
"hostname": "http://pytorch.apachecn.org"
}
},
"my_links" : {
"sidebar" : {
"Home" : "https://www.baidu.com"
}
},
"my_plugins": [
"splitter",
"donate",
"search-pro",
"todo",
"-lunr",
"-search",
"expandable-chapters-small",
"chapter-fold",
"expandable-chapters",
"expandable-chapters-small",
"back-to-top-button",
"advanced-emoji",
"tbfed-pagefooter",
"sectionx",
"page-treeview",
"simple-page-toc",
"github-buttons",
"ancre-navigation"
],
"my_pluginsConfig": {
"ignores": ["node_modules"],
"simple-page-toc": {
"maxDepth": 3,
"skipFirstH1": true
},
"page-toc-button": {
"maxTocDepth": 2,
"minTocSize": 2
},
"page-treeview": {
"copyright": "Copyright &#169; aleen42",
"minHeaderCount": "2",
"minHeaderDeep": "2"
},
"donate": {
"wechat": "微信收款的二维码URL",
"alipay": "支付宝收款的二维码URL",
"title": "",
"button": "赏",
"alipayText": "支付宝打赏",
"wechatText": "微信打赏"
},
"page-copyright": {
"description": "modified at",
"signature": "你的签名",
"wisdom": "Designer, Frontend Developer & overall web enthusiast",
"format": "YYYY-MM-dd hh:mm:ss",
"copyright": "Copyright &#169; 你的名字",
"timeColor": "#666",
"copyrightColor": "#666",
"utcOffset": "8",
"style": "normal",
"noPowered": false
}
}
}
\ No newline at end of file
+ 中文教程 # Summary
+ [起步](tut_getting_started.md)
+ [PyTorch 深度学习: 60 分钟极速入门](deep_learning_60min_blitz.md) * [Introduction](README.md)
+ [什么是 PyTorch?](blitz_tensor_tutorial.md) * 中文教程
+ [Autograd:自动求导](blitz_autograd_tutorial.md) * [起步](tut_getting_started.md)
+ [神经网络](blitz_neural_networks_tutorial.md) * [PyTorch 深度学习: 60 分钟极速入门](deep_learning_60min_blitz.md)
+ [训练分类器](blitz_cifar10_tutorial.md) * [什么是 PyTorch?](blitz_tensor_tutorial.md)
+ [可选:数据并行处理](blitz_data_parallel_tutorial.md) * [Autograd:自动求导](blitz_autograd_tutorial.md)
+ [数据加载和处理教程](data_loading_tutorial.md) * [神经网络](blitz_neural_networks_tutorial.md)
+ [用例子学习 PyTorch](pytorch_with_examples.md) * [训练分类器](blitz_cifar10_tutorial.md)
+ [迁移学习教程](transfer_learning_tutorial.md) * [可选:数据并行处理](blitz_data_parallel_tutorial.md)
+ [混合前端的 seq2seq 模型部署](deploy_seq2seq_hybrid_frontend_tutorial.md) * [数据加载和处理教程](data_loading_tutorial.md)
+ [Saving and Loading Models](saving_loading_models.md) * [用例子学习 PyTorch](pytorch_with_examples.md)
+ [What is `torch.nn` _really_?](nn_tutorial.md) * [迁移学习教程](transfer_learning_tutorial.md)
+ [图像](tut_image.md) * [混合前端的 seq2seq 模型部署](deploy_seq2seq_hybrid_frontend_tutorial.md)
+ [Torchvision 模型微调](finetuning_torchvision_models_tutorial.md) * [Saving and Loading Models](saving_loading_models.md)
+ [空间变换器网络教程](spatial_transformer_tutorial.md) * [What is torch.nn really?](nn_tutorial.md)
+ [使用 PyTorch 进行图像风格转换](neural_style_tutorial.md) * [图像](tut_image.md)
+ [对抗性示例生成](fgsm_tutorial.md) * [Torchvision 模型微调](finetuning_torchvision_models_tutorial.md)
+ [使用 ONNX 将模型从 PyTorch 传输到 Caffe2 和移动端](super_resolution_with_caffe2.md) * [空间变换器网络教程](spatial_transformer_tutorial.md)
+ [文本](tut_text.md) * [使用 PyTorch 进行图像风格转换](neural_style_tutorial.md)
+ [聊天机器人教程](chatbot_tutorial.md) * [对抗性示例生成](fgsm_tutorial.md)
+ [使用字符级别特征的 RNN 网络生成姓氏](char_rnn_generation_tutorial.md) * [使用 ONNX 将模型从 PyTorch 传输到 Caffe2 和移动端](super_resolution_with_caffe2.md)
+ [使用字符级别特征的 RNN 网络进行姓氏分类](char_rnn_classification_tutorial.md) * [文本](tut_text.md)
+ [Deep Learning for NLP with Pytorch](deep_learning_nlp_tutorial.md) * [聊天机器人教程](chatbot_tutorial.md)
+ [PyTorch 介绍](nlp_pytorch_tutorial.md) * [使用字符级别特征的 RNN 网络生成姓氏](char_rnn_generation_tutorial.md)
+ [使用 PyTorch 进行深度学习](nlp_deep_learning_tutorial.md) * [使用字符级别特征的 RNN 网络进行姓氏分类](char_rnn_classification_tutorial.md)
+ [Word Embeddings: Encoding Lexical Semantics](nlp_word_embeddings_tutorial.md) * [Deep Learning for NLP with Pytorch](deep_learning_nlp_tutorial.md)
+ [序列模型和 LSTM 网络](nlp_sequence_models_tutorial.md) * [PyTorch 介绍](nlp_pytorch_tutorial.md)
+ [Advanced: Making Dynamic Decisions and the Bi-LSTM CRF](nlp_advanced_tutorial.md) * [使用 PyTorch 进行深度学习](nlp_deep_learning_tutorial.md)
+ [基于注意力机制的 seq2seq 神经网络翻译](seq2seq_translation_tutorial.md) * [Word Embeddings: Encoding Lexical Semantics](nlp_word_embeddings_tutorial.md)
+ [生成](tut_generative.md) * [序列模型和 LSTM 网络](nlp_sequence_models_tutorial.md)
+ [DCGAN Tutorial](dcgan_faces_tutorial.md) * [Advanced: Making Dynamic Decisions and the Bi-LSTM CRF](nlp_advanced_tutorial.md)
+ [强化学习](tut_reinforcement_learning.md) * [基于注意力机制的 seq2seq 神经网络翻译](seq2seq_translation_tutorial.md)
+ [Reinforcement Learning (DQN) Tutorial](reinforcement_q_learning.md) * [生成](tut_generative.md)
+ [扩展 PyTorch](tut_extending_pytorch.md) * [DCGAN Tutorial](dcgan_faces_tutorial.md)
+ [用 numpy 和 scipy 创建扩展](numpy_extensions_tutorial.md) * [强化学习](tut_reinforcement_learning.md)
+ [Custom C++ and CUDA Extensions](cpp_extension.md) * [Reinforcement Learning (DQN) Tutorial](reinforcement_q_learning.md)
+ [Extending TorchScript with Custom C++ Operators](torch_script_custom_ops.md) * [扩展 PyTorch](tut_extending_pytorch.md)
+ [生产性使用](tut_production_usage.md) * [用 numpy 和 scipy 创建扩展](numpy_extensions_tutorial.md)
+ [Writing Distributed Applications with PyTorch](dist_tuto.md) * [Custom C++ and CUDA Extensions](cpp_extension.md)
+ [使用 Amazon AWS 进行分布式训练](aws_distributed_training_tutorial.md) * [Extending TorchScript with Custom C++ Operators](torch_script_custom_ops.md)
+ [ONNX 现场演示教程](ONNXLive.md) * [生产性使用](tut_production_usage.md)
+ [在 C++ 中加载 PYTORCH 模型](cpp_export.md) * [Writing Distributed Applications with PyTorch](dist_tuto.md)
+ [其它语言中的 PyTorch](tut_other_language.md) * [使用 Amazon AWS 进行分布式训练](aws_distributed_training_tutorial.md)
+ [使用 PyTorch C++ 前端](cpp_frontend.md) * [ONNX 现场演示教程](ONNXLive.md)
+ 中文文档 * [在 C++ 中加载 PYTORCH 模型](cpp_export.md)
+ [注解](docs_notes.md) * [其它语言中的 PyTorch](tut_other_language.md)
+ [自动求导机制](notes_autograd.md) * [使用 PyTorch C++ 前端](cpp_frontend.md)
+ [广播语义](notes_broadcasting.md) * 中文文档
+ [CUDA 语义](notes_cuda.md) * [注解](docs_notes.md)
+ [Extending PyTorch](notes_extending.md) * [自动求导机制](notes_autograd.md)
+ [Frequently Asked Questions](notes_faq.md) * [广播语义](notes_broadcasting.md)
+ [Multiprocessing best practices](notes_multiprocessing.md) * [CUDA 语义](notes_cuda.md)
+ [Reproducibility](notes_randomness.md) * [Extending PyTorch](notes_extending.md)
+ [Serialization semantics](notes_serialization.md) * [Frequently Asked Questions](notes_faq.md)
+ [Windows FAQ](notes_windows.md) * [Multiprocessing best practices](notes_multiprocessing.md)
+ [包参考](docs_package_ref.md) * [Reproducibility](notes_randomness.md)
+ [torch](torch.md) * [Serialization semantics](notes_serialization.md)
+ [torch.Tensor](tensors.md) * [Windows FAQ](notes_windows.md)
+ [Tensor Attributes](tensor_attributes.md) * [包参考](docs_package_ref.md)
+ [数据类型信息](type_info.md) * [torch](torch.md)
+ [torch.sparse](sparse.md) * [torch.Tensor](tensors.md)
+ [torch.cuda](cuda.md) * [Tensor Attributes](tensor_attributes.md)
+ [torch.Storage](storage.md) * [数据类型信息](type_info.md)
+ [torch.nn](nn.md) * [torch.sparse](sparse.md)
+ [torch.nn.functional](nn_functional.md) * [torch.cuda](cuda.md)
+ [torch.nn.init](nn_init.md) * [torch.Storage](storage.md)
+ [torch.optim](optim.md) * [torch.nn](nn.md)
+ [Automatic differentiation package - torch.autograd](autograd.md) * [torch.nn.functional](nn_functional.md)
+ [Distributed communication package - torch.distributed](distributed.md) * [torch.nn.init](nn_init.md)
+ [Probability distributions - torch.distributions](distributions.md) * [torch.optim](optim.md)
+ [Torch Script](jit.md) * [Automatic differentiation package - torch.autograd](autograd.md)
+ [多进程包 - torch.multiprocessing](multiprocessing.md) * [Distributed communication package - torch.distributed](distributed.md)
+ [torch.utils.bottleneck](bottleneck.md) * [Probability distributions - torch.distributions](distributions.md)
+ [torch.utils.checkpoint](checkpoint.md) * [Torch Script](jit.md)
+ [torch.utils.cpp_extension](docs_cpp_extension.md) * [多进程包 - torch.multiprocessing](multiprocessing.md)
+ [torch.utils.data](data.md) * [torch.utils.bottleneck](bottleneck.md)
+ [torch.utils.dlpack](dlpack.md) * [torch.utils.checkpoint](checkpoint.md)
+ [torch.hub](hub.md) * [torch.utils.cpp_extension](docs_cpp_extension.md)
+ [torch.utils.model_zoo](model_zoo.md) * [torch.utils.data](data.md)
+ [torch.onnx](onnx.md) * [torch.utils.dlpack](dlpack.md)
+ [Distributed communication package (deprecated) - torch.distributed.deprecated](distributed_deprecated.md) * [torch.hub](hub.md)
+ [torchvision 参考](docs_torchvision_ref.md) * [torch.utils.model_zoo](model_zoo.md)
+ [torchvision.datasets](torchvision_datasets.md) * [torch.onnx](onnx.md)
+ [torchvision.models](torchvision_models.md) * [Distributed communication package (deprecated) - torch.distributed.deprecated](distributed_deprecated.md)
+ [torchvision.transforms](torchvision_transforms.md) * [torchvision 参考](docs_torchvision_ref.md)
+ [torchvision.utils](torchvision_utils.md) * [torchvision.datasets](torchvision_datasets.md)
* [torchvision.models](torchvision_models.md)
* [torchvision.transforms](torchvision_transforms.md)
* [torchvision.utils](torchvision_utils.md)
{
"title" : "Pytorch 中文文档",
"author" : "ApacheCN",
"description" : "Pytorch 中文文档: 教程和文档",
"language" : "zh-hans",
"plugins": [
"github",
"github-buttons",
"-sharing",
"insert-logo",
"sharing-plus",
"back-to-top-button",
"code",
"copy-code-button",
"mathjax",
"pageview-count",
"edit-link",
"emphasize",
"alerts",
"auto-scroll-table",
"popup",
"hide-element",
"page-toc-button",
"tbfed-pagefooter",
"ga",
"baidu",
"sitemap"
],
"pluginsConfig": {
"github": {
"url": "https://github.com/apachecn"
},
"github-buttons": {
"repo": "apachecn/pytorch-doc-zh",
"types": [
"star",
"watch",
"fork"
],
"size": "small"
},
"insert-logo": {
"url": "http://data.apachecn.org/img/logo.jpg",
"style": "background: none; max-height: 150px; min-height: 150px"
},
"hide-element": {
"elements": [".gitbook-link"]
},
"edit-link": {
"base": "https://github.com/apachecn/pytorch-doc-zh/blob/master/docs/1.0",
"label": "编辑本页"
},
"sharing": {
"qzone": true,
"weibo": true,
"twitter": false,
"facebook": false,
"google": false,
"qq": false,
"line": false,
"whatsapp": false,
"douban": false,
"all": [
"qq", "douban", "facebook", "google", "linkedin", "twitter", "weibo", "whatsapp"
]
},
"page-toc-button": {
"maxTocDepth": 4,
"minTocSize": 4
},
"tbfed-pagefooter": {
"copyright":"Copyright &copy ibooker.org.cn 2019",
"modify_label": "该文件修订时间: ",
"modify_format": "YYYY-MM-DD HH:mm:ss"
},
"ga": {
"token": "UA-102475051-10"
},
"baidu": {
"token": "75439e2cbd22bdd813226000e9dcc12f"
},
"sitemap": {
"hostname": "http://pytorch.apachecn.org"
}
},
"my_links" : {
"sidebar" : {
"Home" : "https://www.baidu.com"
}
},
"my_plugins": [
"splitter",
"donate",
"search-pro",
"todo",
"-lunr",
"-search",
"expandable-chapters-small",
"chapter-fold",
"expandable-chapters",
"expandable-chapters-small",
"back-to-top-button",
"advanced-emoji",
"tbfed-pagefooter",
"sectionx",
"page-treeview",
"simple-page-toc",
"github-buttons",
"ancre-navigation"
],
"my_pluginsConfig": {
"ignores": ["node_modules"],
"simple-page-toc": {
"maxDepth": 3,
"skipFirstH1": true
},
"page-toc-button": {
"maxTocDepth": 2,
"minTocSize": 2
},
"page-treeview": {
"copyright": "Copyright &#169; aleen42",
"minHeaderCount": "2",
"minHeaderDeep": "2"
},
"donate": {
"wechat": "微信收款的二维码URL",
"alipay": "支付宝收款的二维码URL",
"title": "",
"button": "赏",
"alipayText": "支付宝打赏",
"wechatText": "微信打赏"
},
"page-copyright": {
"description": "modified at",
"signature": "你的签名",
"wisdom": "Designer, Frontend Developer & overall web enthusiast",
"format": "YYYY-MM-dd hh:mm:ss",
"copyright": "Copyright &#169; 你的名字",
"timeColor": "#666",
"copyrightColor": "#666",
"utcOffset": "8",
"style": "normal",
"noPowered": false
}
}
}
\ No newline at end of file
...@@ -3,29 +3,34 @@ loginfo() { echo "[INFO] $@"; } ...@@ -3,29 +3,34 @@ loginfo() { echo "[INFO] $@"; }
logerror() { echo "[ERROR] $@" 1>&2; } logerror() { echo "[ERROR] $@" 1>&2; }
gitbook install gitbook install
python3 src/rename_powered_by_ApacheCN.py "home" python3 src/script.py "home" "powered"
gitbook build ./ _book gitbook build ./ _book
python3 src/script.py "home" # python3 src/script.py "home" "index"
versions="0.2 0.3 0.4 1.0" versions="0.2 0.3 0.4 1.0"
for version in $versions;do for version in $versions;do
loginfo "===========================================================" loginfo "==========================================================="
loginfo "开始", ${version}, "版本编译" loginfo "开始", ${version}, "版本编译"
echo "python3 src/rename_powered_by_ApacheCN.py ${version}"
python3 src/rename_powered_by_ApacheCN.py ${version}
echo "cp book.json docs/${version}" echo "cp book.json docs/${version}"
cp book.json docs/${version} cp book.json docs/${version}
# 替换 book.json 的编辑地址
echo "python3 src/script.py ${version} book"
python3 src/script.py ${version} "book"
echo "gitbook install docs/${version}" echo "gitbook install docs/${version}"
gitbook install docs/${version} gitbook install docs/${version}
echo "python3 src/script.py ${version} powered"
python3 src/script.py ${version} "powered"
echo "gitbook build docs/${version} _book/docs/${version}" echo "gitbook build docs/${version} _book/docs/${version}"
gitbook build docs/${version} _book/docs/${version} gitbook build docs/${version} _book/docs/${version}
echo "python3 src/script.py ${version}" # 注释多余的内容
python3 src/script.py ${version} # echo "python3 src/script.py ${version} index"
# python3 src/script.py ${version} "index"
done done
# rm -rf /opt/apache-tomcat-9.0.17/webapps/test_book # rm -rf /opt/apache-tomcat-9.0.17/webapps/test_book
......
...@@ -3,34 +3,14 @@ import os ...@@ -3,34 +3,14 @@ import os
import sys import sys
def format_index(filename): def format_file(filename, str1, str2):
""" """
将基础数据合并为图数据 文件内容的替换功能
:return: :return:
""" """
str1 = """
</head>
<body>
"""
str2 = """
<script type="text/javascript">
function hidden_left(){
document.getElementsByClassName("btn pull-left js-toolbar-action")[0].click()
}
// window.onload = hidden_left();
</script>
</head>
<body onload="hidden_left()">
"""
str3 = "powered by Gitbook"
str4 = "powered by ApacheCN"
with open(filename, 'r') as f: with open(filename, 'r') as f:
var_object = f.read() var_object = f.read()
# var_object = var_object.replace(str1, str2) var_object = var_object.replace(str1, str2)
var_object = var_object.replace(str3, str4)
# print(var_object) # print(var_object)
f = open(filename, "w") f = open(filename, "w")
...@@ -38,9 +18,45 @@ def format_index(filename): ...@@ -38,9 +18,45 @@ def format_index(filename):
if __name__ == "__main__": if __name__ == "__main__":
version = sys.argv[1] version, u_type = sys.argv[1], sys.argv[2]
if version == "home": tag = True
filename = "_book/index.html" if u_type == "index":
else: tag = False
filename = "_book/docs/%s/index.html" % version # if version == "home":
format_index(filename) # filename = "_book/index.html"
# else:
# filename = "_book/docs/%s/index.html" % version
# str1 = """
# </head>
# <body>
# """
# str2 = """
# <script type="text/javascript">
# function hidden_left(){
# document.getElementsByClassName("btn pull-left js-toolbar-action")[0].click()
# }
# // window.onload = hidden_left();
# </script>
# </head>
# <body onload="hidden_left()">
# """
elif u_type == "powered":
if version == "home":
filename = "node_modules/gitbook-plugin-tbfed-pagefooter/index.js"
else:
filename = "docs/%s/node_modules/gitbook-plugin-tbfed-pagefooter/index.js" % version
str1 = "powered by Gitbook"
str2 = "由 ApacheCN 团队提供支持"
elif u_type == "book":
if version == "home":
filename = "book.json"
tag = False
else:
filename = "docs/%s/book.json" % version
str1 = "https://github.com/apachecn/pytorch-doc-zh/blob/master"
str2 = "https://github.com/apachecn/pytorch-doc-zh/blob/master/docs/%s" % version
# 状态为 True 就进行替换
if tag: format_file(filename, str1, str2)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册