We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 512c49e commit 37e526eCopy full SHA for 37e526e
torch/nn/modules/container.py
@@ -268,11 +268,12 @@ def extend(self, parameters):
268
return self
269
270
def extra_repr(self):
271
- tmpstr = ''
+ child_lines = []
272
for k, p in self._parameters.items():
273
size_str = 'x'.join(str(size) for size in p.size())
274
device_str = '' if not p.is_cuda else ' (GPU {})'.format(p.get_device())
275
parastr = 'Parameter containing: [{} of size {}{}]'.format(
276
torch.typename(p.data), size_str, device_str)
277
- tmpstr = tmpstr + ' (' + k + '): ' + parastr + '\n'
+ child_lines.append(' (' + k + '): ' + parastr)
278
+ tmpstr = '\n'.join(child_lines)
279
return tmpstr
0 commit comments