提交 7840d181 编写于 作者: P peizhilin

fix style issue

上级 dc339b78
// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
data_type_transform.cc
\ No newline at end of file
// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
tensor_util.cc
\ No newline at end of file
......@@ -112,11 +112,10 @@ def __bootstrap__():
os.environ['OMP_NUM_THREADS'] = str(num_threads)
read_env_flags = [
'use_pinned_memory', 'check_nan_inf', 'benchmark',
'eager_delete_scope', 'use_mkldnn', 'initial_cpu_memory_in_mb',
'init_allocated_mem', 'free_idle_memory', 'paddle_num_threads',
'dist_threadpool_size', 'eager_delete_tensor_gb',
'reader_queue_speed_test_mode'
'use_pinned_memory', 'check_nan_inf', 'benchmark', 'eager_delete_scope',
'use_mkldnn', 'initial_cpu_memory_in_mb', 'init_allocated_mem',
'free_idle_memory', 'paddle_num_threads', 'dist_threadpool_size',
'eager_delete_tensor_gb', 'reader_queue_speed_test_mode'
]
if os.name != 'nt':
read_env_flags.append('warpctc_dir')
......
......@@ -348,6 +348,7 @@ def _copy_reader_create_op_(block, op):
if os.name != 'nt':
@templatedoc(op_type='create_recordio_file_reader')
def open_recordio_file(filename,
shapes,
......@@ -405,8 +406,8 @@ if os.name != 'nt':
startup_var.desc.set_dtypes(dtypes)
startup_var.persistable = True
main_prog_var = _copy_reader_var_(default_main_program().current_block(),
startup_var)
main_prog_var = _copy_reader_var_(
default_main_program().current_block(), startup_var)
if pass_num > 1:
main_prog_var = multi_pass(reader=main_prog_var, pass_num=pass_num)
......
......@@ -342,6 +342,7 @@ def embedding(input,
if os.name != 'nt':
@templatedoc(op_type="lstm")
def dynamic_lstm(input,
size,
......@@ -961,6 +962,7 @@ def linear_chain_crf(input, label, param_attr=None):
if os.name != 'nt':
@templatedoc()
def crf_decoding(input, param_attr, label=None):
"""
......@@ -988,9 +990,11 @@ if os.name != 'nt':
dtype=helper.input_dtype())
helper.append_op(
type='crf_decoding',
inputs={"Emission": [input],
inputs={
"Emission": [input],
"Transition": transition,
"Label": label},
"Label": label
},
outputs={"ViterbiPath": [viterbi_path]})
return viterbi_path
......@@ -5530,8 +5534,13 @@ def label_smooth(label,
if os.name != 'nt':
@templatedoc()
def roi_pool(input, rois, pooled_height=1, pooled_width=1, spatial_scale=1.0):
def roi_pool(input,
rois,
pooled_height=1,
pooled_width=1,
spatial_scale=1.0):
"""
${comment}
......
......@@ -105,7 +105,6 @@ if os.name != 'nt':
_cum_sum_ = generate_layer_fn('cumsum')
def cumsum(x, axis=None, exclusive=None, reverse=None):
locals_var = locals().keys()
kwargs = dict()
......@@ -115,7 +114,6 @@ if os.name != 'nt':
kwargs[name] = val
return _cum_sum_(**kwargs)
cumsum.__doc__ = _cum_sum_.__doc__ + """
Examples:
......
......@@ -1719,7 +1719,7 @@ def inputs(layers, *args):
if len(args) != 0:
layers.extend(args)
Inputs(*[l.name for l in layers])
Inputs(* [l.name for l in layers])
def outputs(layers, *args):
......@@ -1769,7 +1769,7 @@ def outputs(layers, *args):
assert len(layers) > 0
if HasInputsSet(): # input already set
Outputs(*[l.name for l in layers])
Outputs(* [l.name for l in layers])
return # just return outputs.
if len(layers) != 1:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册