-
-
Notifications
You must be signed in to change notification settings - Fork 17.2k
Description
❔Question
When I uncomment Tensorboard,the following error occurred
Additional context
Run 'tensorboard --logdir=models/runs' to view tensorboard at http://localhost:6006/
Traceback (most recent call last):
File "/Users/leo/Desktop/yolov5/models/yolo.py", line 279, in
tb_writer.add_graph(model.model, img) # add model to tensorboard
File "/Users/leo/.virtualenvs/yolov5_3/lib/python3.7/site-packages/torch/utils/tensorboard/writer.py", line 724, in add_graph
self._get_file_writer().add_graph(graph(model, input_to_model, verbose))
File "/Users/leo/.virtualenvs/yolov5_3/lib/python3.7/site-packages/torch/utils/tensorboard/_pytorch_graph.py", line 286, in graph
trace = torch.jit.trace(model, args)
File "/Users/leo/.virtualenvs/yolov5_3/lib/python3.7/site-packages/torch/jit/_trace.py", line 742, in trace
_module_class,
File "/Users/leo/.virtualenvs/yolov5_3/lib/python3.7/site-packages/torch/jit/_trace.py", line 940, in trace_module
_force_outplace,
File "/Users/leo/.virtualenvs/yolov5_3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 725, in _call_impl
result = self._slow_forward(*input, **kwargs)
File "/Users/leo/.virtualenvs/yolov5_3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 709, in _slow_forward
result = self.forward(*input, **kwargs)
File "/Users/leo/.virtualenvs/yolov5_3/lib/python3.7/site-packages/torch/nn/modules/container.py", line 117, in forward
input = module(input)
File "/Users/leo/.virtualenvs/yolov5_3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 725, in _call_impl
result = self._slow_forward(*input, **kwargs)
File "/Users/leo/.virtualenvs/yolov5_3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 709, in _slow_forward
result = self.forward(*input, **kwargs)
File "/Users/leo/Desktop/yolov5/models/common.py", line 210, in forward
return torch.cat(x, self.d)
TypeError: cat() received an invalid combination of arguments - got (Tensor, int), but expected one of:
- (tuple of Tensors tensors, name dim, *, Tensor out)
- (tuple of Tensors tensors, int dim, *, Tensor out)