leeyeehoo / CSRNet-pytorch

CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes
642 stars 259 forks source link

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

Open winston-wen opened 2 years ago

winston-wen commented 2 years ago

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

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

Tongzi-Zhang commented 3 months ago

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