# TensorBoard in PyTorch
In this tutorial, we implement a MNIST classifier using a simple neural network and visualize the training process using [TensorBoard](https://www.tensorflow.org/get_started/summaries_and_tensorboard). In training phase, we plot the loss and accuracy functions through `scalar_summary` and visualize the training images through `image_summary`. In addition, we visualize the weight and gradient values of the parameters of the neural network using `histogram_summary`. PyTorch code for handling these summary functions can be found [here](https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/04-utils/tensorboard/main.py#L81-L97).
![alt text](gif/tensorboard.gif)
<br>
## Usage
#### 1. Install the dependencies
```bash
$ pip install -r requirements.txt
```
#### 2. Train the model
```bash
$ python main.py
```
#### 3. Open the TensorBoard
To run the TensorBoard, open a new terminal and run the command below. Then, open http://localhost:6006/ on your web browser.
```bash
$ tensorboard --logdir='./logs' --port=6006
```
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Pytorch_pytorch深度学习教程之Tensorboard.zip (5个子文件)
Pytorch_pytorch深度学习教程之Tensorboard
tensorboard
gif
tensorboard.gif 561KB
main.py 3KB
requirements.txt 41B
logger.py 2KB
README.md 1KB
共 5 条
- 1
资源评论
__AtYou__
- 粉丝: 1879
- 资源: 636
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功