

def placeholder(shape=None, ndim=None, dtype=_FLOATX, name=None):
    'Instantiates a placeholder.\n\n    # Arguments\n        shape: shape of the placeholder\n            (integer tuple, may include None entries).\n        ndim: number of axes of the tensor.\n            At least one of {`shape`, `ndim`} must be specified.\n            If both are specified, `shape` is used.\n        dtype: placeholder type.\n        name: optional name string for the placeholder.\n\n    # Returns\n        Placeholder tensor instance.\n    '
    if (not shape):
        if ndim:
            shape = tuple([None for _ in range(ndim)])
    x = tf.placeholder(dtype, shape=shape, name=name)
    x._keras_shape = shape
    x._uses_learning_phase = False
    return x

dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py placeholder/original