提交 34b98041 authored 作者: Iban Harlouchet's avatar Iban Harlouchet

flake8 for tensor/utils.py

上级 253b3856
...@@ -79,11 +79,11 @@ def shape_of_variables(fgraph, input_shapes): ...@@ -79,11 +79,11 @@ def shape_of_variables(fgraph, input_shapes):
if not hasattr(fgraph, 'shape_feature'): if not hasattr(fgraph, 'shape_feature'):
fgraph.attach_feature(theano.tensor.opt.ShapeFeature()) fgraph.attach_feature(theano.tensor.opt.ShapeFeature())
input_dims = [dimension for inp in fgraph.inputs input_dims = [dimension for inp in fgraph.inputs
for dimension in fgraph.shape_feature.shape_of[inp]] for dimension in fgraph.shape_feature.shape_of[inp]]
output_dims = [dimension for shape in fgraph.shape_feature.shape_of.values() output_dims = [dimension for shape in fgraph.shape_feature.shape_of.values()
for dimension in shape] for dimension in shape]
compute_shapes = theano.function(input_dims, output_dims) compute_shapes = theano.function(input_dims, output_dims)
...@@ -93,8 +93,8 @@ def shape_of_variables(fgraph, input_shapes): ...@@ -93,8 +93,8 @@ def shape_of_variables(fgraph, input_shapes):
" interface changed. Now by default, it clones the graph it receives." " interface changed. Now by default, it clones the graph it receives."
" To have the old behavior, give it this new parameter `clone=False`.") " To have the old behavior, give it this new parameter `clone=False`.")
numeric_input_dims = [dim for inp in fgraph.inputs numeric_input_dims = [dim for inp in fgraph.inputs
for dim in input_shapes[inp]] for dim in input_shapes[inp]]
numeric_output_dims = compute_shapes(*numeric_input_dims) numeric_output_dims = compute_shapes(*numeric_input_dims)
sym_to_num_dict = dict(izip(output_dims, numeric_output_dims)) sym_to_num_dict = dict(izip(output_dims, numeric_output_dims))
......
...@@ -58,7 +58,6 @@ whitelist_flake8 = [ ...@@ -58,7 +58,6 @@ whitelist_flake8 = [
"typed_list/tests/test_opt.py", "typed_list/tests/test_opt.py",
"typed_list/tests/test_basic.py", "typed_list/tests/test_basic.py",
"tensor/blas_headers.py", "tensor/blas_headers.py",
"tensor/utils.py",
"tensor/type.py", "tensor/type.py",
"tensor/fourier.py", "tensor/fourier.py",
"tensor/sort.py", "tensor/sort.py",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论