Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么要把img和target用Variable封装起来? #91

Open
winston-wen opened this issue Aug 12, 2021 · 1 comment
Open

为什么要把img和target用Variable封装起来? #91

winston-wen opened this issue Aug 12, 2021 · 1 comment

Comments

@winston-wen
Copy link

如题.
train.py:train()train_loader循环里, img和target都套上了一层torch.autograd.Variable.
train.py:validate()test_loader循环里, img套上了一层torch.autograd.Variable.

为什么要让数据成为可导的??

@Tongzi-Zhang
Copy link

感觉应该是用于反向传播的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants