When i run "Visualize-Shirts.py"
One training epoch has 376 images One test epoch has 130 images /home/wang/Anaconda3/envs/camou/lib/python3.8/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3190.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] max range is 19.587, max number of the bins is 461 max range is 6.927, max number of the bins is 202 Traceback (most recent call last): File "/home/wang/Desktop/wjl-project/Adversarial_camou-main/Visualize-Shirts.py", line 43, in <module> tex,tex_trouser = trainer.update_mesh(type='determinate') File "/home/wang/Desktop/wjl-project/Adversarial_camou-main/train.py", line 350, in update_mesh gb_tshirt = -(-(self.seeds_tshirt + 1e-20).log() + 1e-20).log() AttributeError: 'PatchTrainer' object has no attribute 'seeds_tshirt'
When i run "Visualize-Shirts.py"
One training epoch has 376 images One test epoch has 130 images /home/wang/Anaconda3/envs/camou/lib/python3.8/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3190.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] max range is 19.587, max number of the bins is 461 max range is 6.927, max number of the bins is 202 Traceback (most recent call last): File "/home/wang/Desktop/wjl-project/Adversarial_camou-main/Visualize-Shirts.py", line 43, in <module> tex,tex_trouser = trainer.update_mesh(type='determinate') File "/home/wang/Desktop/wjl-project/Adversarial_camou-main/train.py", line 350, in update_mesh gb_tshirt = -(-(self.seeds_tshirt + 1e-20).log() + 1e-20).log() AttributeError: 'PatchTrainer' object has no attribute 'seeds_tshirt'
下面是train中的代码, def update_mesh(self, tau=0.3, type='gumbel'):
camouflage:
我不知道问题出在哪个地方