Closed Indigo6 closed 3 years ago
@hbin-ac
Hi, @Indigo6 , We forget to change the hourglass model file in the public repository. I'm sorry for that, we have updated the hourglass.py now. If you find any question, please feel free to contact us.
I still got this problem when training hourglass 256&384, 128 is okay.
The size of tensor a (9) must match the size of tensor b (3) at non-singleton dimension 3 Error occurs, No graph saved Traceback (most recent call last): File "tools/train.py", line 223, in <module> main() File "tools/train.py", line 111, in main writer_dict['writer'].add_graph(model, (dump_input, )) File "/home/lsc/anaconda3/envs/dark/lib/python3.8/site-packages/tensorboardX/writer.py", line 945, in add_graph self._get_file_writer().add_graph(graph(model, input_to_model, verbose)) File "/home/lsc/anaconda3/envs/dark/lib/python3.8/site-packages/torch/utils/tensorboard/_pytorch_graph.py", line 292, in graph raise e File "/home/lsc/anaconda3/envs/dark/lib/python3.8/site-packages/torch/utils/tensorboard/_pytorch_graph.py", line 286, in graph trace = torch.jit.trace(model, args) File "/home/lsc/anaconda3/envs/dark/lib/python3.8/site-packages/torch/jit/_trace.py", line 733, in trace return trace_module( File "/home/lsc/anaconda3/envs/dark/lib/python3.8/site-packages/torch/jit/_trace.py", line 934, in trace_module module._c._create_method_from_trace( File "/home/lsc/anaconda3/envs/dark/lib/python3.8/site-packages/torch/nn/modules/module.py", line 887, in _call_impl result = self._slow_forward(*input, **kwargs) File "/home/lsc/anaconda3/envs/dark/lib/python3.8/site-packages/torch/nn/modules/module.py", line 860, in _slow_forward result = self.forward(*input, **kwargs) File "/home/lsc/pose/DarkPose/tools/../lib/models/hourglass.py", line 188, in forward y = self.hg[i](x) File "/home/lsc/anaconda3/envs/dark/lib/python3.8/site-packages/torch/nn/modules/module.py", line 887, in _call_impl result = self._slow_forward(*input, **kwargs) File "/home/lsc/anaconda3/envs/dark/lib/python3.8/site-packages/torch/nn/modules/module.py", line 860, in _slow_forward result = self.forward(*input, **kwargs) File "/home/lsc/pose/DarkPose/tools/../lib/models/hourglass.py", line 101, in forward return self._hour_glass_forward(self.depth, x) File "/home/lsc/pose/DarkPose/tools/../lib/models/hourglass.py", line 87, in _hour_glass_forward low2 = self._hour_glass_forward(n-1, low1) File "/home/lsc/pose/DarkPose/tools/../lib/models/hourglass.py", line 87, in _hour_glass_forward low2 = self._hour_glass_forward(n-1, low1) File "/home/lsc/pose/DarkPose/tools/../lib/models/hourglass.py", line 87, in _hour_glass_forward low2 = self._hour_glass_forward(n-1, low1) File "/home/lsc/pose/DarkPose/tools/../lib/models/hourglass.py", line 96, in _hour_glass_forward out = up1 + up2 RuntimeError: The size of tensor a (9) must match the size of tensor b (3) at non-singleton dimension 3
I downloaded your project, tried to train Hourglass, but got following error: