|
|
@ -27,7 +27,7 @@ import numpy
|
|
|
|
import warnings
|
|
|
|
import warnings
|
|
|
|
import six
|
|
|
|
import six
|
|
|
|
from functools import reduce, partial
|
|
|
|
from functools import reduce, partial
|
|
|
|
from ..data_feeder import convert_dtype
|
|
|
|
from ..data_feeder import convert_dtype, check_type_and_dtype
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
__all__ = [
|
|
|
|
'While', 'Switch', 'increment', 'array_write', 'create_array', 'less_than',
|
|
|
|
'While', 'Switch', 'increment', 'array_write', 'create_array', 'less_than',
|
|
|
@ -253,6 +253,10 @@ def Print(input,
|
|
|
|
data: 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
|
|
|
|
data: 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
|
|
|
|
|
|
|
|
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
check_type_and_dtype(input, 'input', Variable,
|
|
|
|
|
|
|
|
['float32', 'float64', 'int32_t', 'int64_t', 'bool'],
|
|
|
|
|
|
|
|
'fluid.layers.Print')
|
|
|
|
|
|
|
|
|
|
|
|
helper = LayerHelper('print' + "_" + input.name, **locals())
|
|
|
|
helper = LayerHelper('print' + "_" + input.name, **locals())
|
|
|
|
output = helper.create_variable_for_type_inference(input.dtype)
|
|
|
|
output = helper.create_variable_for_type_inference(input.dtype)
|
|
|
|
helper.append_op(
|
|
|
|
helper.append_op(
|
|
|
|