class_docstr: A general-purpose neural embedding algorithm that is highly customizable.
  
  It can learn low-dimensional dense embeddings of high-dimensional objects. The embeddings
  are learned in a way that preserves the semantics of the relationship between pairs of
  objects in the original space in the embedding space.
class_docstr_tok: ["A","general-purpose","neural","embedding","algorithm","that","is","highly","customizable",".","It","can","learn","low-dimensional","dense","embeddings","of","high-dimensional","objects",".","The","embeddings","are","learned","in","a","way","that","preserves","the","semantics","of","the","relationship","between","pairs","of","objects","in","the","original","space","in","the","embedding","space","."]
docstr: Object2Vec is :class:`Estimator` used for anomaly detection.
  
  This Estimator may be fit via calls to
  :meth:`~sagemaker.amazon.amazon_estimator.AmazonAlgorithmEstimatorBase.fit`.
  There is an utility
  :meth:`~sagemaker.amazon.amazon_estimator.AmazonAlgorithmEstimatorBase.record_set`
  that can be used to upload data to S3 and creates
  :class:`~sagemaker.amazon.amazon_estimator.RecordSet` to be passed to
  the `fit` call.
  
  After this Estimator is fit, model data is stored in S3. The model
  may be deployed to an Amazon SageMaker Endpoint by invoking
  :meth:`~sagemaker.amazon.estimator.EstimatorBase.deploy`. As well as
  deploying an Endpoint, deploy returns a
  :class:`~sagemaker.amazon.Predictor` object that can be used for
  inference calls using the trained model hosted in the SageMaker
  Endpoint.
  
  Object2Vec Estimators can be configured by setting hyperparameters.
  The available hyperparameters for Object2Vec are documented below.
  
  For further information on the AWS Object2Vec algorithm, please
  consult AWS technical documentation:
  https://docs.aws.amazon.com/sagemaker/latest/dg/object2vec.html
  
  Args:
      role (str): An AWS IAM role (either name or full ARN). The Amazon
          SageMaker training jobs and APIs that create Amazon SageMaker
          endpoints use this role to access training data and model
          artifacts. After the endpoint is created, the inference code
          might use the IAM role, if accessing AWS resource.
      instance_count (int or PipelineVariable): Number of Amazon EC2 instances to use
          for training.
      instance_type (str or PipelineVariable): Type of EC2 instance to use for training,
          for example, 'ml.c4.xlarge'.
      epochs (int): Total number of epochs for SGD training
      enc0_max_seq_len (int): Maximum sequence length
      enc0_vocab_size (int): Vocabulary size of tokens
      enc_dim (int): Optional. Dimension of the output of the embedding
          layer
      mini_batch_size (int): Optional. mini batch size for SGD training
      early_stopping_patience (int): Optional. The allowed number of
          consecutive epochs without improvement before early stopping is
          applied
      early_stopping_tolerance (float): Optional. The value used to
          determine whether the algorithm has made improvement between two
          consecutive epochs for early stopping
      dropout (float): Optional. Dropout probability on network layers
      weight_decay (float): Optional. Weight decay parameter during
          optimization
      bucket_width (int): Optional. The allowed difference between data
          sequence length when bucketing is enabled
      num_classes (int): Optional. Number of classes for classification
          training (ignored for regression problems)
      mlp_layers (int): Optional. Number of MLP layers in the network
      mlp_dim (int): Optional. Dimension of the output of MLP layer
      mlp_activation (str): Optional. Type of activation function for the
          MLP layer
      output_layer (str): Optional. Type of output layer
      optimizer (str): Optional. Type of optimizer for training
      learning_rate (float): Optional. Learning rate for SGD training
      negative_sampling_rate (int): Optional. Negative sampling rate
      comparator_list (str): Optional. Customization of comparator
          operator
      tied_token_embedding_weight (bool): Optional. Tying of token
          embedding layer weight
      token_embedding_storage_type (str): Optional. Type of token
          embedding storage
      enc0_network (str): Optional. Network model of encoder "enc0"
      enc1_network (str): Optional. Network model of encoder "enc1"
      enc0_cnn_filter_width (int): Optional. CNN filter width
      enc1_cnn_filter_width (int): Optional. CNN filter width
      enc1_max_seq_len (int): Optional. Maximum sequence length
      enc0_token_embedding_dim (int): Optional. Output dimension of token
          embedding layer
      enc1_token_embedding_dim (int): Optional. Output dimension of token
          embedding layer
      enc1_vocab_size (int): Optional. Vocabulary size of tokens
      enc0_layers (int): Optional. Number of layers in encoder
      enc1_layers (int): Optional. Number of layers in encoder
      enc0_freeze_pretrained_embedding (bool): Optional. Freeze pretrained
          embedding weights
      enc1_freeze_pretrained_embedding (bool): Optional. Freeze pretrained
          embedding weights
      **kwargs: base class keyword argument values.
  
  .. tip::
  
      You can find additional parameters for initializing this class at
      :class:`~sagemaker.estimator.amazon_estimator.AmazonAlgorithmEstimatorBase` and
      :class:`~sagemaker.estimator.EstimatorBase`.
docstr_tok: ["Object2Vec","is",":","class",":","`","Estimator","`","used","for","anomaly","detection",".","This","Estimator","may","be","fit","via","calls","to",":","meth",":","`","~sagemaker.amazon.amazon_estimator.AmazonAlgorithmEstimatorBase.fit","`",".","There","is","an","utility",":","meth",":","`","~sagemaker.amazon.amazon_estimator.AmazonAlgorithmEstimatorBase.record_set","`","that","can","be","used","to","upload","data","to","S3","and","creates",":","class",":","`","~sagemaker.amazon.amazon_estimator.RecordSet","`","to","be","passed","to","the","`","fit","`","call",".","After","this","Estimator","is","fit",",","model","data","is","stored","in","S3",".","The","model","may","be","deployed","to","an","Amazon","SageMaker","Endpoint","by","invoking",":","meth",":","`","~sagemaker.amazon.estimator.EstimatorBase.deploy","`",".","As","well","as","deploying","an","Endpoint",",","deploy","returns","a",":","class",":","`","~sagemaker.amazon.Predictor","`","object","that","can","be","used","for","inference","calls","using","the","trained","model","hosted","in","the","SageMaker","Endpoint",".","Object2Vec","Estimators","can","be","configured","by","setting","hyperparameters",".","The","available","hyperparameters","for","Object2Vec","are","documented","below",".","For","further","information","on","the","AWS","Object2Vec","algorithm",",","please","consult","AWS","technical","documentation",":","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/object2vec.html","Args",":","role","(","str",")",":","An","AWS","IAM","role","(","either","name","or","full","ARN",")",".","The","Amazon","SageMaker","training","jobs","and","APIs","that","create","Amazon","SageMaker","endpoints","use","this","role","to","access","training","data","and","model","artifacts",".","After","the","endpoint","is","created",",","the","inference","code","might","use","the","IAM","role",",","if","accessing","AWS","resource",".","instance_count","(","int","or","PipelineVariable",")",":","Number","of","Amazon","EC2","instances","to","use","for","training",".","instance_type","(","str","or","PipelineVariable",")",":","Type","of","EC2","instance","to","use","for","training",",","for","example",",","'ml.c4.xlarge","'",".","epochs","(","int",")",":","Total","number","of","epochs","for","SGD","training","enc0_max_seq_len","(","int",")",":","Maximum","sequence","length","enc0_vocab_size","(","int",")",":","Vocabulary","size","of","tokens","enc_dim","(","int",")",":","Optional",".","Dimension","of","the","output","of","the","embedding","layer","mini_batch_size","(","int",")",":","Optional",".","mini","batch","size","for","SGD","training","early_stopping_patience","(","int",")",":","Optional",".","The","allowed","number","of","consecutive","epochs","without","improvement","before","early","stopping","is","applied","early_stopping_tolerance","(","float",")",":","Optional",".","The","value","used","to","determine","whether","the","algorithm","has","made","improvement","between","two","consecutive","epochs","for","early","stopping","dropout","(","float",")",":","Optional",".","Dropout","probability","on","network","layers","weight_decay","(","float",")",":","Optional",".","Weight","decay","parameter","during","optimization","bucket_width","(","int",")",":","Optional",".","The","allowed","difference","between","data","sequence","length","when","bucketing","is","enabled","num_classes","(","int",")",":","Optional",".","Number","of","classes","for","classification","training","(","ignored","for","regression","problems",")","mlp_layers","(","int",")",":","Optional",".","Number","of","MLP","layers","in","the","network","mlp_dim","(","int",")",":","Optional",".","Dimension","of","the","output","of","MLP","layer","mlp_activation","(","str",")",":","Optional",".","Type","of","activation","function","for","the","MLP","layer","output_layer","(","str",")",":","Optional",".","Type","of","output","layer","optimizer","(","str",")",":","Optional",".","Type","of","optimizer","for","training","learning_rate","(","float",")",":","Optional",".","Learning","rate","for","SGD","training","negative_sampling_rate","(","int",")",":","Optional",".","Negative","sampling","rate","comparator_list","(","str",")",":","Optional",".","Customization","of","comparator","operator","tied_token_embedding_weight","(","bool",")",":","Optional",".","Tying","of","token","embedding","layer","weight","token_embedding_storage_type","(","str",")",":","Optional",".","Type","of","token","embedding","storage","enc0_network","(","str",")",":","Optional",".","Network","model","of","encoder","``","enc0","''","enc1_network","(","str",")",":","Optional",".","Network","model","of","encoder","``","enc1","''","enc0_cnn_filter_width","(","int",")",":","Optional",".","CNN","filter","width","enc1_cnn_filter_width","(","int",")",":","Optional",".","CNN","filter","width","enc1_max_seq_len","(","int",")",":","Optional",".","Maximum","sequence","length","enc0_token_embedding_dim","(","int",")",":","Optional",".","Output","dimension","of","token","embedding","layer","enc1_token_embedding_dim","(","int",")",":","Optional",".","Output","dimension","of","token","embedding","layer","enc1_vocab_size","(","int",")",":","Optional",".","Vocabulary","size","of","tokens","enc0_layers","(","int",")",":","Optional",".","Number","of","layers","in","encoder","enc1_layers","(","int",")",":","Optional",".","Number","of","layers","in","encoder","enc0_freeze_pretrained_embedding","(","bool",")",":","Optional",".","Freeze","pretrained","embedding","weights","enc1_freeze_pretrained_embedding","(","bool",")",":","Optional",".","Freeze","pretrained","embedding","weights","*","*","kwargs",":","base","class","keyword","argument","values",".","..","tip",":",":","You","can","find","additional","parameters","for","initializing","this","class","at",":","class",":","`","~sagemaker.estimator.amazon_estimator.AmazonAlgorithmEstimatorBase","`","and",":","class",":","`","~sagemaker.estimator.EstimatorBase","`","."]
code: def __init__(
      self,
      role: Optional[Union[str, PipelineVariable]] = None,
      instance_count: Optional[Union[int, PipelineVariable]] = None,
      instance_type: Optional[Union[str, PipelineVariable]] = None,
      epochs: Optional[int] = None,
      enc0_max_seq_len: Optional[int] = None,
      enc0_vocab_size: Optional[int] = None,
      enc_dim: Optional[int] = None,
      mini_batch_size: Optional[int] = None,
      early_stopping_patience: Optional[int] = None,
      early_stopping_tolerance: Optional[float] = None,
      dropout: Optional[float] = None,
      weight_decay: Optional[float] = None,
      bucket_width: Optional[int] = None,
      num_classes: Optional[int] = None,
      mlp_layers: Optional[int] = None,
      mlp_dim: Optional[int] = None,
      mlp_activation: Optional[str] = None,
      output_layer: Optional[str] = None,
      optimizer: Optional[str] = None,
      learning_rate: Optional[float] = None,
      negative_sampling_rate: Optional[int] = None,
      comparator_list: Optional[str] = None,
      tied_token_embedding_weight: Optional[bool] = None,
      token_embedding_storage_type: Optional[str] = None,
      enc0_network: Optional[str] = None,
      enc1_network: Optional[str] = None,
      enc0_cnn_filter_width: Optional[int] = None,
      enc1_cnn_filter_width: Optional[int] = None,
      enc1_max_seq_len: Optional[int] = None,
      enc0_token_embedding_dim: Optional[int] = None,
      enc1_token_embedding_dim: Optional[int] = None,
      enc1_vocab_size: Optional[int] = None,
      enc0_layers: Optional[int] = None,
      enc1_layers: Optional[int] = None,
      enc0_freeze_pretrained_embedding: Optional[bool] = None,
      enc1_freeze_pretrained_embedding: Optional[bool] = None,
      **kwargs,
  ):
      """Object2Vec is :class:`Estimator` used for anomaly detection.
  
      This Estimator may be fit via calls to
      :meth:`~sagemaker.amazon.amazon_estimator.AmazonAlgorithmEstimatorBase.fit`.
      There is an utility
      :meth:`~sagemaker.amazon.amazon_estimator.AmazonAlgorithmEstimatorBase.record_set`
      that can be used to upload data to S3 and creates
      :class:`~sagemaker.amazon.amazon_estimator.RecordSet` to be passed to
      the `fit` call.
  
      After this Estimator is fit, model data is stored in S3. The model
      may be deployed to an Amazon SageMaker Endpoint by invoking
      :meth:`~sagemaker.amazon.estimator.EstimatorBase.deploy`. As well as
      deploying an Endpoint, deploy returns a
      :class:`~sagemaker.amazon.Predictor` object that can be used for
      inference calls using the trained model hosted in the SageMaker
      Endpoint.
  
      Object2Vec Estimators can be configured by setting hyperparameters.
      The available hyperparameters for Object2Vec are documented below.
  
      For further information on the AWS Object2Vec algorithm, please
      consult AWS technical documentation:
      https://docs.aws.amazon.com/sagemaker/latest/dg/object2vec.html
  
      Args:
          role (str): An AWS IAM role (either name or full ARN). The Amazon
              SageMaker training jobs and APIs that create Amazon SageMaker
              endpoints use this role to access training data and model
              artifacts. After the endpoint is created, the inference code
              might use the IAM role, if accessing AWS resource.
          instance_count (int or PipelineVariable): Number of Amazon EC2 instances to use
              for training.
          instance_type (str or PipelineVariable): Type of EC2 instance to use for training,
              for example, 'ml.c4.xlarge'.
          epochs (int): Total number of epochs for SGD training
          enc0_max_seq_len (int): Maximum sequence length
          enc0_vocab_size (int): Vocabulary size of tokens
          enc_dim (int): Optional. Dimension of the output of the embedding
              layer
          mini_batch_size (int): Optional. mini batch size for SGD training
          early_stopping_patience (int): Optional. The allowed number of
              consecutive epochs without improvement before early stopping is
              applied
          early_stopping_tolerance (float): Optional. The value used to
              determine whether the algorithm has made improvement between two
              consecutive epochs for early stopping
          dropout (float): Optional. Dropout probability on network layers
          weight_decay (float): Optional. Weight decay parameter during
              optimization
          bucket_width (int): Optional. The allowed difference between data
              sequence length when bucketing is enabled
          num_classes (int): Optional. Number of classes for classification
              training (ignored for regression problems)
          mlp_layers (int): Optional. Number of MLP layers in the network
          mlp_dim (int): Optional. Dimension of the output of MLP layer
          mlp_activation (str): Optional. Type of activation function for the
              MLP layer
          output_layer (str): Optional. Type of output layer
          optimizer (str): Optional. Type of optimizer for training
          learning_rate (float): Optional. Learning rate for SGD training
          negative_sampling_rate (int): Optional. Negative sampling rate
          comparator_list (str): Optional. Customization of comparator
              operator
          tied_token_embedding_weight (bool): Optional. Tying of token
              embedding layer weight
          token_embedding_storage_type (str): Optional. Type of token
              embedding storage
          enc0_network (str): Optional. Network model of encoder "enc0"
          enc1_network (str): Optional. Network model of encoder "enc1"
          enc0_cnn_filter_width (int): Optional. CNN filter width
          enc1_cnn_filter_width (int): Optional. CNN filter width
          enc1_max_seq_len (int): Optional. Maximum sequence length
          enc0_token_embedding_dim (int): Optional. Output dimension of token
              embedding layer
          enc1_token_embedding_dim (int): Optional. Output dimension of token
              embedding layer
          enc1_vocab_size (int): Optional. Vocabulary size of tokens
          enc0_layers (int): Optional. Number of layers in encoder
          enc1_layers (int): Optional. Number of layers in encoder
          enc0_freeze_pretrained_embedding (bool): Optional. Freeze pretrained
              embedding weights
          enc1_freeze_pretrained_embedding (bool): Optional. Freeze pretrained
              embedding weights
          **kwargs: base class keyword argument values.
  
      .. tip::
  
          You can find additional parameters for initializing this class at
          :class:`~sagemaker.estimator.amazon_estimator.AmazonAlgorithmEstimatorBase` and
          :class:`~sagemaker.estimator.EstimatorBase`.
      """
  
      super(Object2Vec, self).__init__(
          role, instance_count, instance_type, **kwargs
      )
      self.enc_dim = enc_dim
      self.mini_batch_size = mini_batch_size
      self.epochs = epochs
      self.early_stopping_patience = early_stopping_patience
      self.early_stopping_tolerance = early_stopping_tolerance
      self.dropout = dropout
      self.weight_decay = weight_decay
      self.bucket_width = bucket_width
      self.num_classes = num_classes
      self.mlp_layers = mlp_layers
      self.mlp_dim = mlp_dim
      self.mlp_activation = mlp_activation
      self.output_layer = output_layer
      self.optimizer = optimizer
      self.learning_rate = learning_rate
  
      self.negative_sampling_rate = negative_sampling_rate
      self.comparator_list = comparator_list
      self.tied_token_embedding_weight = tied_token_embedding_weight
      self.token_embedding_storage_type = token_embedding_storage_type
  
      self.enc0_network = enc0_network
      self.enc1_network = enc1_network
      self.enc0_cnn_filter_width = enc0_cnn_filter_width
      self.enc1_cnn_filter_width = enc1_cnn_filter_width
      self.enc0_max_seq_len = enc0_max_seq_len
      self.enc1_max_seq_len = enc1_max_seq_len
      self.enc0_token_embedding_dim = enc0_token_embedding_dim
      self.enc1_token_embedding_dim = enc1_token_embedding_dim
      self.enc0_vocab_size = enc0_vocab_size
      self.enc1_vocab_size = enc1_vocab_size
      self.enc0_layers = enc0_layers
      self.enc1_layers = enc1_layers
      self.enc0_freeze_pretrained_embedding = (
          enc0_freeze_pretrained_embedding
      )
      self.enc1_freeze_pretrained_embedding = (
          enc1_freeze_pretrained_embedding
      )
  
imports: from __future__ import absolute_import
  from typing import Union, Optional
  from sagemaker import image_uris
  from sagemaker.amazon.amazon_estimator import AmazonAlgorithmEstimatorBase
  from sagemaker.amazon.hyperparameter import Hyperparameter
  from sagemaker.amazon.validation import ge, le, isin
  from sagemaker.predictor import Predictor
  from sagemaker.model import Model
  from sagemaker.session import Session
  from sagemaker.utils import pop_out_unused_kwarg
  from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 1 to create a new Object2Vec object from inherited base classes: AmazonAlgorithmEstimatorBase with example: obj = Object2Vec(role, instance_count, instance_type, epochs, enc0_max_seq_len, enc0_vocab_size, enc_dim, mini_batch_size, early_stopping_patience, early_stopping_tolerance, dropout, weight_decay, bucket_width, num_classes, mlp_layers, mlp_dim, mlp_activation, output_layer, optimizer, learning_rate, negative_sampling_rate, comparator_list, tied_token_embedding_weight, token_embedding_storage_type, enc0_network, enc1_network, enc0_cnn_filter_width, enc1_cnn_filter_width, enc1_max_seq_len, enc0_token_embedding_dim, enc1_token_embedding_dim, enc1_vocab_size, enc0_layers, enc1_layers, enc0_freeze_pretrained_embedding, enc1_freeze_pretrained_embedding)