File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,11 @@ def collate_torch_preds(results):
24
24
results = zip (* results )
25
25
collate_results = []
26
26
for output in results :
27
- output = [batch .numpy () if isinstance (batch , torch .Tensor ) else batch for batch in output ]
27
+ output = [batch .numpy () if isinstance (batch , torch .Tensor ) \
28
+ else batch for batch in output ]
28
29
collate_results .append (np .concatenate (output ))
29
30
elif isinstance (batch , torch .Tensor ):
30
- results = [batch .numpy () if isinstance (batch , torch .Tensor ) else batch for batch in results ]
31
+ results = [batch .numpy () if isinstance (batch , torch .Tensor ) \
32
+ else batch for batch in results ]
31
33
collate_results = np .concatenate (results )
32
34
return collate_results
Original file line number Diff line number Diff line change @@ -192,8 +192,9 @@ def calib_dataloader(self, dataloader):
192
192
a 'real' calib_dataloader will be created,
193
193
the reason is we have to know the framework info
194
194
and only after the Quantization object created then
195
- framework infomation can be known. Future we will support
196
- creating iterable dataloader from lpot.experimental.common.DataLoader
195
+ framework infomation can be known.
196
+ Future we will support creating iterable dataloader
197
+ from lpot.experimental.common.DataLoader
197
198
"""
198
199
from .common import _generate_common_dataloader
199
200
self ._calib_dataloader = _generate_common_dataloader (
You can’t perform that action at this time.
0 commit comments