Package org.tensorflow.metadata.v0
Class SparseFeature
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- org.tensorflow.metadata.v0.SparseFeature
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable,SparseFeatureOrBuilder
public final class SparseFeature extends com.google.protobuf.GeneratedMessageV3 implements SparseFeatureOrBuilder
A sparse feature represents a sparse tensor that is encoded with a combination of raw features, namely index features and a value feature. Each index feature defines a list of indices in a different dimension.
Protobuf typetensorflow.metadata.v0.SparseFeature- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSparseFeature.BuilderA sparse feature represents a sparse tensor that is encoded with a combination of raw features, namely index features and a value feature.static classSparseFeature.IndexFeatureProtobuf typetensorflow.metadata.v0.SparseFeature.IndexFeaturestatic interfaceSparseFeature.IndexFeatureOrBuilderstatic classSparseFeature.ValueFeatureProtobuf typetensorflow.metadata.v0.SparseFeature.ValueFeaturestatic interfaceSparseFeature.ValueFeatureOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intDENSE_SHAPE_FIELD_NUMBERstatic intDEPRECATED_FIELD_NUMBERstatic intINDEX_FEATURE_FIELD_NUMBERstatic intIS_SORTED_FIELD_NUMBERstatic intLIFECYCLE_STAGE_FIELD_NUMBERstatic intNAME_FIELD_NUMBERstatic com.google.protobuf.Parser<SparseFeature>PARSERDeprecated.static intPRESENCE_FIELD_NUMBERstatic intTYPE_FIELD_NUMBERstatic intVALUE_FEATURE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)static SparseFeaturegetDefaultInstance()SparseFeaturegetDefaultInstanceForType()FixedShapegetDenseShape()Shape of the sparse tensor that this SparseFeature represents.FixedShapeOrBuildergetDenseShapeOrBuilder()Shape of the sparse tensor that this SparseFeature represents.booleangetDeprecated()Deprecated.static com.google.protobuf.Descriptors.DescriptorgetDescriptor()SparseFeature.IndexFeaturegetIndexFeature(int index)Features that represent indexes.intgetIndexFeatureCount()Features that represent indexes.List<SparseFeature.IndexFeature>getIndexFeatureList()Features that represent indexes.SparseFeature.IndexFeatureOrBuildergetIndexFeatureOrBuilder(int index)Features that represent indexes.List<? extends SparseFeature.IndexFeatureOrBuilder>getIndexFeatureOrBuilderList()Features that represent indexes.booleangetIsSorted()If true then the index values are already sorted lexicographically.LifecycleStagegetLifecycleStage()The lifecycle_stage determines where a feature is expected to be used, and therefore how important issues with it are.StringgetName()Name for the sparse feature.com.google.protobuf.ByteStringgetNameBytes()Name for the sparse feature.com.google.protobuf.Parser<SparseFeature>getParserForType()FeaturePresencegetPresence()Deprecated.FeaturePresenceOrBuildergetPresenceOrBuilder()Deprecated.intgetSerializedSize()FeatureTypegetType()Deprecated.com.google.protobuf.UnknownFieldSetgetUnknownFields()SparseFeature.ValueFeaturegetValueFeature()requiredSparseFeature.ValueFeatureOrBuildergetValueFeatureOrBuilder()requiredbooleanhasDenseShape()Shape of the sparse tensor that this SparseFeature represents.booleanhasDeprecated()Deprecated.inthashCode()booleanhasIsSorted()If true then the index values are already sorted lexicographically.booleanhasLifecycleStage()The lifecycle_stage determines where a feature is expected to be used, and therefore how important issues with it are.booleanhasName()Name for the sparse feature.booleanhasPresence()Deprecated.booleanhasType()Deprecated.booleanhasValueFeature()requiredprotected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static SparseFeature.BuildernewBuilder()static SparseFeature.BuildernewBuilder(SparseFeature prototype)SparseFeature.BuildernewBuilderForType()protected SparseFeature.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static SparseFeatureparseDelimitedFrom(InputStream input)static SparseFeatureparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static SparseFeatureparseFrom(byte[] data)static SparseFeatureparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static SparseFeatureparseFrom(com.google.protobuf.ByteString data)static SparseFeatureparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static SparseFeatureparseFrom(com.google.protobuf.CodedInputStream input)static SparseFeatureparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static SparseFeatureparseFrom(InputStream input)static SparseFeatureparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static SparseFeatureparseFrom(ByteBuffer data)static SparseFeatureparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<SparseFeature>parser()SparseFeature.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DEPRECATED_FIELD_NUMBER
public static final int DEPRECATED_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LIFECYCLE_STAGE_FIELD_NUMBER
public static final int LIFECYCLE_STAGE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRESENCE_FIELD_NUMBER
public static final int PRESENCE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DENSE_SHAPE_FIELD_NUMBER
public static final int DENSE_SHAPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INDEX_FEATURE_FIELD_NUMBER
public static final int INDEX_FEATURE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IS_SORTED_FIELD_NUMBER
public static final int IS_SORTED_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VALUE_FEATURE_FIELD_NUMBER
public static final int VALUE_FEATURE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PARSER
@Deprecated public static final com.google.protobuf.Parser<SparseFeature> PARSER
Deprecated.
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
hasName
public boolean hasName()
Name for the sparse feature. This should not clash with other features in the same schema.
optional string name = 1;- Specified by:
hasNamein interfaceSparseFeatureOrBuilder- Returns:
- Whether the name field is set.
-
getName
public String getName()
Name for the sparse feature. This should not clash with other features in the same schema.
optional string name = 1;- Specified by:
getNamein interfaceSparseFeatureOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
Name for the sparse feature. This should not clash with other features in the same schema.
optional string name = 1;- Specified by:
getNameBytesin interfaceSparseFeatureOrBuilder- Returns:
- The bytes for name.
-
hasDeprecated
@Deprecated public boolean hasDeprecated()
Deprecated.This field is no longer supported. Instead, use: lifecycle_stage: DEPRECATED TODO(b/111450258): remove this.
optional bool deprecated = 2 [deprecated = true];- Specified by:
hasDeprecatedin interfaceSparseFeatureOrBuilder- Returns:
- Whether the deprecated field is set.
-
getDeprecated
@Deprecated public boolean getDeprecated()
Deprecated.This field is no longer supported. Instead, use: lifecycle_stage: DEPRECATED TODO(b/111450258): remove this.
optional bool deprecated = 2 [deprecated = true];- Specified by:
getDeprecatedin interfaceSparseFeatureOrBuilder- Returns:
- The deprecated.
-
hasLifecycleStage
public boolean hasLifecycleStage()
The lifecycle_stage determines where a feature is expected to be used, and therefore how important issues with it are.
optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 7;- Specified by:
hasLifecycleStagein interfaceSparseFeatureOrBuilder- Returns:
- Whether the lifecycleStage field is set.
-
getLifecycleStage
public LifecycleStage getLifecycleStage()
The lifecycle_stage determines where a feature is expected to be used, and therefore how important issues with it are.
optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 7;- Specified by:
getLifecycleStagein interfaceSparseFeatureOrBuilder- Returns:
- The lifecycleStage.
-
hasPresence
@Deprecated public boolean hasPresence()
Deprecated.Constraints on the presence of this feature in examples. Deprecated, this is inferred by the referred features.
optional .tensorflow.metadata.v0.FeaturePresence presence = 4 [deprecated = true];- Specified by:
hasPresencein interfaceSparseFeatureOrBuilder- Returns:
- Whether the presence field is set.
-
getPresence
@Deprecated public FeaturePresence getPresence()
Deprecated.Constraints on the presence of this feature in examples. Deprecated, this is inferred by the referred features.
optional .tensorflow.metadata.v0.FeaturePresence presence = 4 [deprecated = true];- Specified by:
getPresencein interfaceSparseFeatureOrBuilder- Returns:
- The presence.
-
getPresenceOrBuilder
@Deprecated public FeaturePresenceOrBuilder getPresenceOrBuilder()
Deprecated.Constraints on the presence of this feature in examples. Deprecated, this is inferred by the referred features.
optional .tensorflow.metadata.v0.FeaturePresence presence = 4 [deprecated = true];- Specified by:
getPresenceOrBuilderin interfaceSparseFeatureOrBuilder
-
hasDenseShape
public boolean hasDenseShape()
Shape of the sparse tensor that this SparseFeature represents. Currently not supported. TODO(b/109669962): Consider deriving this from the referred features.
optional .tensorflow.metadata.v0.FixedShape dense_shape = 5;- Specified by:
hasDenseShapein interfaceSparseFeatureOrBuilder- Returns:
- Whether the denseShape field is set.
-
getDenseShape
public FixedShape getDenseShape()
Shape of the sparse tensor that this SparseFeature represents. Currently not supported. TODO(b/109669962): Consider deriving this from the referred features.
optional .tensorflow.metadata.v0.FixedShape dense_shape = 5;- Specified by:
getDenseShapein interfaceSparseFeatureOrBuilder- Returns:
- The denseShape.
-
getDenseShapeOrBuilder
public FixedShapeOrBuilder getDenseShapeOrBuilder()
Shape of the sparse tensor that this SparseFeature represents. Currently not supported. TODO(b/109669962): Consider deriving this from the referred features.
optional .tensorflow.metadata.v0.FixedShape dense_shape = 5;- Specified by:
getDenseShapeOrBuilderin interfaceSparseFeatureOrBuilder
-
getIndexFeatureList
public List<SparseFeature.IndexFeature> getIndexFeatureList()
Features that represent indexes. Should be integers >= 0.
repeated .tensorflow.metadata.v0.SparseFeature.IndexFeature index_feature = 6;- Specified by:
getIndexFeatureListin interfaceSparseFeatureOrBuilder
-
getIndexFeatureOrBuilderList
public List<? extends SparseFeature.IndexFeatureOrBuilder> getIndexFeatureOrBuilderList()
Features that represent indexes. Should be integers >= 0.
repeated .tensorflow.metadata.v0.SparseFeature.IndexFeature index_feature = 6;- Specified by:
getIndexFeatureOrBuilderListin interfaceSparseFeatureOrBuilder
-
getIndexFeatureCount
public int getIndexFeatureCount()
Features that represent indexes. Should be integers >= 0.
repeated .tensorflow.metadata.v0.SparseFeature.IndexFeature index_feature = 6;- Specified by:
getIndexFeatureCountin interfaceSparseFeatureOrBuilder
-
getIndexFeature
public SparseFeature.IndexFeature getIndexFeature(int index)
Features that represent indexes. Should be integers >= 0.
repeated .tensorflow.metadata.v0.SparseFeature.IndexFeature index_feature = 6;- Specified by:
getIndexFeaturein interfaceSparseFeatureOrBuilder
-
getIndexFeatureOrBuilder
public SparseFeature.IndexFeatureOrBuilder getIndexFeatureOrBuilder(int index)
Features that represent indexes. Should be integers >= 0.
repeated .tensorflow.metadata.v0.SparseFeature.IndexFeature index_feature = 6;- Specified by:
getIndexFeatureOrBuilderin interfaceSparseFeatureOrBuilder
-
hasIsSorted
public boolean hasIsSorted()
If true then the index values are already sorted lexicographically.
optional bool is_sorted = 8;- Specified by:
hasIsSortedin interfaceSparseFeatureOrBuilder- Returns:
- Whether the isSorted field is set.
-
getIsSorted
public boolean getIsSorted()
If true then the index values are already sorted lexicographically.
optional bool is_sorted = 8;- Specified by:
getIsSortedin interfaceSparseFeatureOrBuilder- Returns:
- The isSorted.
-
hasValueFeature
public boolean hasValueFeature()
required
optional .tensorflow.metadata.v0.SparseFeature.ValueFeature value_feature = 9;- Specified by:
hasValueFeaturein interfaceSparseFeatureOrBuilder- Returns:
- Whether the valueFeature field is set.
-
getValueFeature
public SparseFeature.ValueFeature getValueFeature()
required
optional .tensorflow.metadata.v0.SparseFeature.ValueFeature value_feature = 9;- Specified by:
getValueFeaturein interfaceSparseFeatureOrBuilder- Returns:
- The valueFeature.
-
getValueFeatureOrBuilder
public SparseFeature.ValueFeatureOrBuilder getValueFeatureOrBuilder()
required
optional .tensorflow.metadata.v0.SparseFeature.ValueFeature value_feature = 9;- Specified by:
getValueFeatureOrBuilderin interfaceSparseFeatureOrBuilder
-
hasType
@Deprecated public boolean hasType()
Deprecated.Type of value feature. Deprecated, this is inferred by the referred features.
optional .tensorflow.metadata.v0.FeatureType type = 10 [deprecated = true];- Specified by:
hasTypein interfaceSparseFeatureOrBuilder- Returns:
- Whether the type field is set.
-
getType
@Deprecated public FeatureType getType()
Deprecated.Type of value feature. Deprecated, this is inferred by the referred features.
optional .tensorflow.metadata.v0.FeatureType type = 10 [deprecated = true];- Specified by:
getTypein interfaceSparseFeatureOrBuilder- Returns:
- The type.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static SparseFeature parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SparseFeature parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SparseFeature parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SparseFeature parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SparseFeature parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SparseFeature parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SparseFeature parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static SparseFeature parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static SparseFeature parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static SparseFeature parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static SparseFeature parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static SparseFeature parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public SparseFeature.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static SparseFeature.Builder newBuilder()
-
newBuilder
public static SparseFeature.Builder newBuilder(SparseFeature prototype)
-
toBuilder
public SparseFeature.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected SparseFeature.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static SparseFeature getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<SparseFeature> parser()
-
getParserForType
public com.google.protobuf.Parser<SparseFeature> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public SparseFeature getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-