diff --git a/README.md b/README.md index 6e850970..5430147b 100644 --- a/README.md +++ b/README.md @@ -10,27 +10,27 @@ This repository provides tutorial code for deep learning researchers to learn [P ## Table of Contents #### 1. Basics -* [PyTorch Basics](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/pytorch_basics/main.py) -* [Linear Regression](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/linear_regression/main.py#L24-L31) -* [Logistic Regression](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/logistic_regression/main.py#L35-L42) -* [Feedforward Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/feedforward_neural_network/main.py#L36-L47) +* [PyTorch Basics](../../tree/master/tutorials/01-basics/pytorch_basics/main.py) +* [Linear Regression](../../tree/master/tutorials/01-basics/linear_regression/main.py#L24-L31) +* [Logistic Regression](../../tree/master/tutorials/01-basics/logistic_regression/main.py#L35-L42) +* [Feedforward Neural Network](../../tree/master/tutorials/01-basics/feedforward_neural_network/main.py#L36-L47) #### 2. Intermediate -* [Convolutional Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/convolutional_neural_network/main.py#L33-L53) -* [Deep Residual Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/deep_residual_network/main.py#L67-L103) -* [Recurrent Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/recurrent_neural_network/main.py#L38-L56) -* [Bidirectional Recurrent Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/bidirectional_recurrent_neural_network/main.py#L38-L57) -* [Language Model (RNN-LM)](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/language_model/main.py#L28-L53) -* [Generative Adversarial Network](https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/02-intermediate/generative_adversarial_network/main.py#L34-L50) +* [Convolutional Neural Network](../../tree/master/tutorials/02-intermediate/convolutional_neural_network/main.py#L33-L53) +* [Deep Residual Network](../../tree/master/tutorials/02-intermediate/deep_residual_network/main.py#L67-L103) +* [Recurrent Neural Network](../../tree/master/tutorials/02-intermediate/recurrent_neural_network/main.py#L38-L56) +* [Bidirectional Recurrent Neural Network](../../tree/master/tutorials/02-intermediate/bidirectional_recurrent_neural_network/main.py#L38-L57) +* [Language Model (RNN-LM)](../../tree/master/tutorials/02-intermediate/language_model/main.py#L28-L53) +* [Generative Adversarial Network](../../blob/master/tutorials/02-intermediate/generative_adversarial_network/main.py#L34-L50) #### 3. Advanced -* [Image Captioning (CNN-RNN)](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/image_captioning) -* [Deep Convolutional GAN (DCGAN)](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/deep_convolutional_gan) -* [Variational Auto-Encoder](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/variational_auto_encoder) -* [Neural Style Transfer](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/neural_style_transfer) +* [Image Captioning (CNN-RNN)](../../tree/master/tutorials/03-advanced/image_captioning) +* [Deep Convolutional GAN (DCGAN)](../../tree/master/tutorials/03-advanced/deep_convolutional_gan) +* [Variational Auto-Encoder](../../tree/master/tutorials/03-advanced/variational_auto_encoder) +* [Neural Style Transfer](../../tree/master/tutorials/03-advanced/neural_style_transfer) #### 4. Utilities -* [TensorBoard in PyTorch](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/04-utils/tensorboard) +* [TensorBoard in PyTorch](../../tree/master/tutorials/04-utils/tensorboard) @@ -38,7 +38,7 @@ This repository provides tutorial code for deep learning researchers to learn [P ## Getting Started ```bash -$ git clone https://github.com/yunjey/pytorch-tutorial.git +$ git clone ../...git $ cd pytorch-tutorial/tutorials/project_path $ python main.py # cpu version $ python main-gpu.py # gpu version @@ -55,5 +55,5 @@ $ python main-gpu.py # gpu version
-## Author -Yunjey Choi/ [@yunjey](https://github.com/yunjey) \ No newline at end of file +## Fork from +Yunjey Choi/ [@yunjey](https://github.com/yunjey) diff --git a/tutorials/01-basics/pytorch_basics/main.py b/tutorials/01-basics/pytorch_basics/main.py index 17a50707..6b48d9b2 100644 --- a/tutorials/01-basics/pytorch_basics/main.py +++ b/tutorials/01-basics/pytorch_basics/main.py @@ -20,6 +20,7 @@ #======================= Basic autograd example 1 =======================# # Create tensors. +# 在这里进行运算只能是Variable与Variable,或者Tensor与Tensor,不能混用 x = Variable(torch.Tensor([1]), requires_grad=True) w = Variable(torch.Tensor([2]), requires_grad=True) b = Variable(torch.Tensor([3]), requires_grad=True) @@ -162,4 +163,4 @@ def __len__(self): # Save and load only the model parameters(recommended). torch.save(resnet.state_dict(), 'params.pkl') -resnet.load_state_dict(torch.load('params.pkl')) \ No newline at end of file +resnet.load_state_dict(torch.load('params.pkl'))