Skip to content

Commit b3a7c9c

Browse files
committed
fix pylint issue
1 parent 9e92dbc commit b3a7c9c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lpot/adaptor/torch_utils/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ def collate_torch_preds(results):
2424
results = zip(*results)
2525
collate_results = []
2626
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]
2829
collate_results.append(np.concatenate(output))
2930
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]
3133
collate_results = np.concatenate(results)
3234
return collate_results

lpot/experimental/quantization.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ def calib_dataloader(self, dataloader):
192192
a 'real' calib_dataloader will be created,
193193
the reason is we have to know the framework info
194194
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
197198
"""
198199
from .common import _generate_common_dataloader
199200
self._calib_dataloader = _generate_common_dataloader(

0 commit comments

Comments
 (0)