tf.contrib.layers.real_valued_column

View source on GitHub

Creates a _RealValuedColumn for dense numeric data.

column_name A string defining real valued column name.
dimension An integer specifying dimension of the real valued column. The default is 1.
default_value A single value compatible with dtype or a list of values compatible with dtype which the column takes on during tf.Example parsing if data is missing. When dimension is not None, a default value of None will cause tf.io.parse_example to fail if an example does not contain this column. If a single value is provided, the same value will be applied as the default value for every dimension. If a list of values is provided, the length of the list should be equal to the value of dimension. Only scalar default value is supported in case dimension is not specified.
dtype defines the type of values. Default value is tf.float32. Must be a non-quantized, real integer or floating point type.
normalizer If not None, a function that can be used to normalize the value of the real valued column after default_value is applied for parsing. Normalizer function takes the input tensor as its argument, and returns the output tensor. (e.g. lambda x: (x - 3.0) / 4.2). Note that for variable length columns, the normalizer should expect an input_tensor of type SparseTensor.

A _RealValuedColumn.

TypeError if dimension is not an int
ValueError if dimension is not a positive integer
TypeError if default_value is a list but its length is not equal to the value of dimension.
TypeError if default_value is not compatible with dtype.
ValueError if dtype is not convertible to tf.float32.