質問編集履歴
2
errorの変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,15 +42,11 @@
|
|
42
42
|
|
43
43
|
---------------------------------------------------------------------------
|
44
44
|
|
45
|
-
|
45
|
+
RuntimeError Traceback (most recent call last)
|
46
46
|
|
47
|
-
~/Documents/4.自学自習/DeepLearning/SemanticSegmentation/
|
47
|
+
~/Documents/4.自学自習/DeepLearning/SemanticSegmentation/torch_test.py in
|
48
48
|
|
49
|
-
178 with torch.no_grad():
|
50
|
-
|
51
|
-
---->
|
49
|
+
----> 293 writer.add_graph(deeplabv3, x)
|
52
|
-
|
53
|
-
180 # writer.close()
|
54
50
|
|
55
51
|
|
56
52
|
|
@@ -65,6 +61,20 @@
|
|
65
61
|
715 else:
|
66
62
|
|
67
63
|
716 # Caffe2 models do not have the 'forward' method
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
~/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/utils/tensorboard/_pytorch_graph.py in graph(model, args, verbose)
|
68
|
+
|
69
|
+
289 print(e)
|
70
|
+
|
71
|
+
290 print('Error occurs, No graph saved')
|
72
|
+
|
73
|
+
--> 291 raise e
|
74
|
+
|
75
|
+
292
|
76
|
+
|
77
|
+
293 if verbose:
|
68
78
|
|
69
79
|
|
70
80
|
|
@@ -110,77 +120,7 @@
|
|
110
120
|
|
111
121
|
|
112
122
|
|
113
|
-
|
114
|
-
|
115
|
-
718 input = result
|
116
|
-
|
117
|
-
719 if torch._C._get_tracing_state():
|
118
|
-
|
119
|
-
--> 720 result = self._slow_forward(*input, **kwargs)
|
120
|
-
|
121
|
-
721 else:
|
122
|
-
|
123
|
-
722 result = self.forward(*input, **kwargs)
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
~/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py in _slow_forward(self, *input, **kwargs)
|
128
|
-
|
129
|
-
702 recording_scopes = False
|
130
|
-
|
131
|
-
703 try:
|
132
|
-
|
133
|
-
--> 704 result = self.forward(*input, **kwargs)
|
134
|
-
|
135
|
-
705 finally:
|
136
|
-
|
137
|
-
706 if recording_scopes:
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
~/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torchvision/models/segmentation/_utils.py in forward(self, x)
|
142
|
-
|
143
|
-
18 input_shape = x.shape[-2:]
|
144
|
-
|
145
|
-
19 # contract: features is a dict of tensors
|
146
|
-
|
147
|
-
---> 20 features = self.backbone(x)
|
148
|
-
|
149
|
-
21
|
150
|
-
|
151
|
-
22 result = OrderedDict()
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
~/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
|
156
|
-
|
157
|
-
724 _global_forward_hooks.values(),
|
158
|
-
|
159
|
-
725 self._forward_hooks.values()):
|
160
|
-
|
161
|
-
--> 726 hook_result = hook(self, input, result)
|
162
|
-
|
163
|
-
727 if hook_result is not None:
|
164
|
-
|
165
|
-
728 result = hook_result
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
~/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torchsummary/torchsummary.py in hook(module, input, output)
|
170
|
-
|
171
|
-
24 ]
|
172
|
-
|
173
|
-
25 else:
|
174
|
-
|
175
|
-
---> 26 summary[m_key]["output_shape"] = list(output.size())
|
176
|
-
|
177
|
-
27 summary[m_key]["output_shape"][0] = batch_size
|
178
|
-
|
179
|
-
28
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
AttributeError: 'collections.OrderedDict' object has no attribute 'size'
|
123
|
+
RuntimeError: Encountering a dict at the output of the tracer might cause the trace to be incorrect, this is only valid if the container structure does not change based on the module's inputs. Consider using a constant container instead (e.g. for `list`, use a `tuple` instead. for `dict`, use a `NamedTuple` instead). If you absolutely need this and know the side effects, pass strict=False to trace() to allow this behavior.
|
184
124
|
|
185
125
|
```
|
186
126
|
|
1
タグ追加
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Tensorboardでpytorchモデル
|
1
|
+
Tensorboardでpytorchモデルを可視化する際のエラー
|
test
CHANGED
File without changes
|