Expose two feature column types into tf.__internal__ API.
These two classes are used by keras for instance type checking. PiperOrigin-RevId: 361240829 Change-Id: Ife075cc0840171f0148f39208039e0e3d905b1b1
This commit is contained in:
parent
f2ae249fc8
commit
d0b5e4188c
@ -2169,6 +2169,8 @@ class FeatureColumn(object):
|
||||
raise NotImplementedError('Must be implemented in subclasses.')
|
||||
|
||||
|
||||
# TODO(b/181853833): Add a tf.type for instance type checking.
|
||||
@tf_export('__internal__.feature_column.DenseColumn', v1=[])
|
||||
class DenseColumn(FeatureColumn):
|
||||
"""Represents a column which can be represented as `Tensor`.
|
||||
|
||||
@ -2330,6 +2332,8 @@ def _create_categorical_column_weighted_sum(
|
||||
name='weighted_sum')
|
||||
|
||||
|
||||
# TODO(b/181853833): Add a tf.type for instance type checking.
|
||||
@tf_export('__internal__.feature_column.SequenceDenseColumn', v1=[])
|
||||
class SequenceDenseColumn(FeatureColumn):
|
||||
"""Represents dense sequence data."""
|
||||
|
||||
|
@ -0,0 +1,45 @@
|
||||
path: "tensorflow.__internal__.feature_column.DenseColumn"
|
||||
tf_class {
|
||||
is_instance: "<class \'tensorflow.python.feature_column.feature_column_v2.DenseColumn\'>"
|
||||
is_instance: "<class \'tensorflow.python.feature_column.feature_column_v2.FeatureColumn\'>"
|
||||
is_instance: "<type \'object\'>"
|
||||
member {
|
||||
name: "name"
|
||||
mtype: "<class \'abc.abstractproperty\'>"
|
||||
}
|
||||
member {
|
||||
name: "parents"
|
||||
mtype: "<class \'abc.abstractproperty\'>"
|
||||
}
|
||||
member {
|
||||
name: "parse_example_spec"
|
||||
mtype: "<class \'abc.abstractproperty\'>"
|
||||
}
|
||||
member {
|
||||
name: "variable_shape"
|
||||
mtype: "<class \'abc.abstractproperty\'>"
|
||||
}
|
||||
member_method {
|
||||
name: "__init__"
|
||||
}
|
||||
member_method {
|
||||
name: "create_state"
|
||||
argspec: "args=[\'self\', \'state_manager\'], varargs=None, keywords=None, defaults=None"
|
||||
}
|
||||
member_method {
|
||||
name: "from_config"
|
||||
argspec: "args=[\'cls\', \'config\', \'custom_objects\', \'columns_by_name\'], varargs=None, keywords=None, defaults=[\'None\', \'None\'], "
|
||||
}
|
||||
member_method {
|
||||
name: "get_config"
|
||||
argspec: "args=[\'self\'], varargs=None, keywords=None, defaults=None"
|
||||
}
|
||||
member_method {
|
||||
name: "get_dense_tensor"
|
||||
argspec: "args=[\'self\', \'transformation_cache\', \'state_manager\'], varargs=None, keywords=None, defaults=None"
|
||||
}
|
||||
member_method {
|
||||
name: "transform_feature"
|
||||
argspec: "args=[\'self\', \'transformation_cache\', \'state_manager\'], varargs=None, keywords=None, defaults=None"
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
path: "tensorflow.__internal__.feature_column.SequenceDenseColumn.TensorSequenceLengthPair"
|
||||
tf_class {
|
||||
is_instance: "<class \'tensorflow.python.feature_column.feature_column_v2.TensorSequenceLengthPair\'>"
|
||||
is_instance: "<type \'tuple\'>"
|
||||
member {
|
||||
name: "dense_tensor"
|
||||
mtype: "<type \'property\'>"
|
||||
}
|
||||
member {
|
||||
name: "sequence_length"
|
||||
mtype: "<type \'property\'>"
|
||||
}
|
||||
member_method {
|
||||
name: "__init__"
|
||||
}
|
||||
member_method {
|
||||
name: "count"
|
||||
}
|
||||
member_method {
|
||||
name: "index"
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
path: "tensorflow.__internal__.feature_column.SequenceDenseColumn"
|
||||
tf_class {
|
||||
is_instance: "<class \'tensorflow.python.feature_column.feature_column_v2.SequenceDenseColumn\'>"
|
||||
is_instance: "<class \'tensorflow.python.feature_column.feature_column_v2.FeatureColumn\'>"
|
||||
is_instance: "<type \'object\'>"
|
||||
member {
|
||||
name: "TensorSequenceLengthPair"
|
||||
mtype: "<type \'type\'>"
|
||||
}
|
||||
member {
|
||||
name: "name"
|
||||
mtype: "<class \'abc.abstractproperty\'>"
|
||||
}
|
||||
member {
|
||||
name: "parents"
|
||||
mtype: "<class \'abc.abstractproperty\'>"
|
||||
}
|
||||
member {
|
||||
name: "parse_example_spec"
|
||||
mtype: "<class \'abc.abstractproperty\'>"
|
||||
}
|
||||
member_method {
|
||||
name: "__init__"
|
||||
}
|
||||
member_method {
|
||||
name: "create_state"
|
||||
argspec: "args=[\'self\', \'state_manager\'], varargs=None, keywords=None, defaults=None"
|
||||
}
|
||||
member_method {
|
||||
name: "from_config"
|
||||
argspec: "args=[\'cls\', \'config\', \'custom_objects\', \'columns_by_name\'], varargs=None, keywords=None, defaults=[\'None\', \'None\'], "
|
||||
}
|
||||
member_method {
|
||||
name: "get_config"
|
||||
argspec: "args=[\'self\'], varargs=None, keywords=None, defaults=None"
|
||||
}
|
||||
member_method {
|
||||
name: "get_sequence_dense_tensor"
|
||||
argspec: "args=[\'self\', \'transformation_cache\', \'state_manager\'], varargs=None, keywords=None, defaults=None"
|
||||
}
|
||||
member_method {
|
||||
name: "transform_feature"
|
||||
argspec: "args=[\'self\', \'transformation_cache\', \'state_manager\'], varargs=None, keywords=None, defaults=None"
|
||||
}
|
||||
}
|
@ -1,5 +1,13 @@
|
||||
path: "tensorflow.__internal__.feature_column"
|
||||
tf_module {
|
||||
member {
|
||||
name: "DenseColumn"
|
||||
mtype: "<type \'type\'>"
|
||||
}
|
||||
member {
|
||||
name: "SequenceDenseColumn"
|
||||
mtype: "<type \'type\'>"
|
||||
}
|
||||
member {
|
||||
name: "StateManager"
|
||||
mtype: "<type \'type\'>"
|
||||
|
Loading…
Reference in New Issue
Block a user