class_docstr: Encodes atom features into embeddings based on the Open Graph Benchmark feature set in conformer_featurizer.
  
  Parameters
  ----------
  emb_dim : int
      The dimension that the returned embedding will have.
  padding : bool, optional (default=False)
      If true then the last index will be used for padding.
  
  Examples
  --------
  >>> from deepchem.feat.molecule_featurizers.conformer_featurizer import full_atom_feature_dims
  >>> atom_encoder = AtomEncoder(emb_dim=32)
  >>> num_rows = 10
  >>> atom_features = torch.stack([
  ... torch.randint(low=0, high=dim, size=(num_rows,))
  ... for dim in full_atom_feature_dims
  ... ], dim=1)
  >>> atom_embeddings = atom_encoder(atom_features)
class_docstr_tok: ["Encodes","atom","features","into","embeddings","based","on","the","Open","Graph","Benchmark","feature","set","in","conformer_featurizer",".","Parameters","--","--","--","--","--","emb_dim",":","int","The","dimension","that","the","returned","embedding","will","have",".","padding",":","bool",",","optional","(","default=False",")","If","true","then","the","last","index","will","be","used","for","padding",".","Examples","--","--","--","--",">",">",">","from","deepchem.feat.molecule_featurizers.conformer_featurizer","import","full_atom_feature_dims",">",">",">","atom_encoder","=","AtomEncoder","(","emb_dim=32",")",">",">",">","num_rows","=","10",">",">",">","atom_features","=","torch.stack","(","[","...","torch.randint","(","low=0",",","high=dim",",","size=","(","num_rows",",",")",")","...","for","dim","in","full_atom_feature_dims","...","]",",","dim=1",")",">",">",">","atom_embeddings","=","atom_encoder","(","atom_features",")"]
code: def __init__(self, emb_dim, padding=False):
      super(AtomEncoder, self).__init__()
  
      self.atom_embedding_list = torch.nn.ModuleList()
      self.padding = padding
  
      for dim in full_atom_feature_dims:
          if padding:
              emb = torch.nn.Embedding(dim + 1, emb_dim, padding_idx=0)
          else:
              emb = torch.nn.Embedding(dim, emb_dim)
          torch.nn.init.xavier_uniform_(emb.weight.data)
          self.atom_embedding_list.append(emb)
  
imports: from functools import partial
  from math import sqrt
  from typing import Callable, Dict, List, Union
  import dgl
  import torch
  from torch import nn
  import torch.nn.functional
  from deepchem.feat.molecule_featurizers.conformer_featurizer import full_atom_feature_dims, full_bond_feature_dims
  from deepchem.models.torch_models.layers import MultilayerPerceptron
  from deepchem.utils.graph_utils import aggregate_max, aggregate_mean, aggregate_min, aggregate_moment, aggregate_std, aggregate_sum, aggregate_var, scale_amplification, scale_attenuation, scale_identity
label_desc: Use image node_id 1 to create a new AtomEncoder object from inherited base classes: torch.nn with example: obj = AtomEncoder(emb_dim, padding)