[SAMPLES] Fix flake issues in Python speech sample (#12514)
* Fix flake issues * Add whitespace * Add whitespaces in tests asserts
This commit is contained in:
parent
b9457b3a31
commit
4dc713c7eb
@ -102,7 +102,7 @@ def main():
|
||||
if args.batch_size:
|
||||
batch_size = args.batch_size if args.context_window_left == args.context_window_right == 0 else 1
|
||||
|
||||
if any([not _input.node.layout.empty for _input in model.inputs]):
|
||||
if any((not _input.node.layout.empty for _input in model.inputs)):
|
||||
set_batch(model, batch_size)
|
||||
else:
|
||||
log.warning('Layout is not set for any input, so custom batch size is not set')
|
||||
|
@ -55,7 +55,8 @@ def get_input_layouts(layout_string: str, inputs: List[Output]) -> Dict[str, str
|
||||
return {_input.get_any_name(): layout_string[1:-1] for _input in inputs}
|
||||
else:
|
||||
sep = '],' if ',' in layout_string else ']'
|
||||
return dict([_input.split('[') for _input in layout_string[:-1].split(sep)])
|
||||
tmp = [_input.split('[') for _input in layout_string[:-1].split(sep)]
|
||||
return {_input[0]: _input[1] for _input in tmp}
|
||||
|
||||
|
||||
def get_sorted_scale_factors(scale_factor_arg: Tuple[List[str], List[str]], inputs: List[Output]) -> List[str]:
|
||||
|
Loading…
Reference in New Issue
Block a user