forked from mindspore-Ecosystem/mindspore
fix pylint warnings
This commit is contained in:
parent
40beecc3a6
commit
f2230fb070
|
@ -82,6 +82,8 @@ def get_dataset(batch_size=1, repeat_count=1, distribute_file=''):
|
|||
'''
|
||||
get dataset
|
||||
'''
|
||||
_ = distribute_file
|
||||
|
||||
ds = de.TFRecordDataset([cfg.data_file], cfg.schema_file, columns_list=["input_ids", "input_mask",
|
||||
"segment_ids", "label_ids"])
|
||||
type_cast_op = C.TypeCast(mstype.int32)
|
||||
|
|
|
@ -58,6 +58,8 @@ def get_dataset(batch_size=1, repeat_count=1, distribute_file=''):
|
|||
'''
|
||||
get dataset
|
||||
'''
|
||||
_ = distribute_file
|
||||
|
||||
ds = de.TFRecordDataset([cfg.data_file], cfg.schema_file, columns_list=["input_ids", "input_mask",
|
||||
"segment_ids", "label_ids"])
|
||||
type_cast_op = C.TypeCast(mstype.int32)
|
||||
|
|
|
@ -208,6 +208,7 @@ class Conv2dBatchNormQuant(Cell):
|
|||
symmetric=False,
|
||||
narrow_range=False):
|
||||
super(Conv2dBatchNormQuant, self).__init__()
|
||||
_ = dilation
|
||||
self.stride = stride
|
||||
self.conv = P.Conv2D(out_channel=out_channels,
|
||||
kernel_size=kernel_size,
|
||||
|
|
|
@ -2030,7 +2030,7 @@ class OneHot(PrimitiveWithInfer):
|
|||
depth_val = depth['value']
|
||||
validator.check_integer("depth", depth_val, 0, Rel.GE, self.name)
|
||||
# create new dimension at end if self.axis is -1
|
||||
indices_shp.insert(self.axis, depth_val) if self.axis >= 0 else indices_shp.append(depth_val)
|
||||
_ = indices_shp.insert(self.axis, depth_val) if self.axis >= 0 else indices_shp.append(depth_val)
|
||||
|
||||
return {'shape': indices_shp,
|
||||
'dtype': on_value['dtype'],
|
||||
|
|
|
@ -38,6 +38,7 @@ class EventWriter(Process):
|
|||
|
||||
def __init__(self, filepath: str, flush_interval: int) -> None:
|
||||
super().__init__()
|
||||
_ = flush_interval
|
||||
with open(filepath, 'w'):
|
||||
os.chmod(filepath, stat.S_IWUSR | stat.S_IRUSR)
|
||||
self._writer = EventWriter_(filepath)
|
||||
|
|
Loading…
Reference in New Issue