deepmd.tf.loss.dos
==================

.. py:module:: deepmd.tf.loss.dos


Classes
-------

.. autoapisummary::

   deepmd.tf.loss.dos.DOSLoss


Module Contents
---------------

.. py:class:: DOSLoss(starter_learning_rate: float, numb_dos: int = 500, start_pref_dos: float = 1.0, limit_pref_dos: float = 1.0, start_pref_cdf: float = 1000, limit_pref_cdf: float = 1.0, start_pref_ados: float = 0.0, limit_pref_ados: float = 0.0, start_pref_acdf: float = 0.0, limit_pref_acdf: float = 0.0, protect_value: float = 1e-08, log_fit: bool = False, **kwargs: Any)

   Bases: :py:obj:`deepmd.tf.loss.loss.Loss`


   
   Loss function for DeepDOS models.
















   ..
       !! processed by numpydoc !!

   .. py:attribute:: starter_learning_rate


   .. py:attribute:: numb_dos
      :value: 500



   .. py:attribute:: protect_value
      :value: 1e-08



   .. py:attribute:: log_fit
      :value: False



   .. py:attribute:: start_pref_dos
      :value: 1.0



   .. py:attribute:: limit_pref_dos
      :value: 1.0



   .. py:attribute:: start_pref_cdf
      :value: 1000



   .. py:attribute:: limit_pref_cdf
      :value: 1.0



   .. py:attribute:: start_pref_ados
      :value: 0.0



   .. py:attribute:: limit_pref_ados
      :value: 0.0



   .. py:attribute:: start_pref_acdf
      :value: 0.0



   .. py:attribute:: limit_pref_acdf
      :value: 0.0



   .. py:attribute:: has_dos


   .. py:attribute:: has_cdf


   .. py:attribute:: has_ados


   .. py:attribute:: has_acdf


   .. py:method:: build(learning_rate: deepmd.tf.env.tf.Tensor, natoms: deepmd.tf.env.tf.Tensor, model_dict: dict, label_dict: dict, suffix: str) -> tuple[deepmd.tf.env.tf.Tensor, dict[str, deepmd.tf.env.tf.Tensor]]

      
      Build the loss function graph.


      :Parameters:

          **learning_rate** : :obj:`tf.Tensor`
              learning rate

          **natoms** : :obj:`tf.Tensor`
              number of atoms

          **model_dict** : :class:`python:dict`\[:class:`python:str`, :obj:`tf.Tensor`]
              A dictionary that maps model keys to tensors

          **label_dict** : :class:`python:dict`\[:class:`python:str`, :obj:`tf.Tensor`]
              A dictionary that maps label keys to tensors

          **suffix** : :class:`python:str`
              suffix



      :Returns:

          :obj:`tf.Tensor`
              the total squared loss

          :class:`python:dict`\[:class:`python:str`, :obj:`tf.Tensor`]
              A dictionary that maps loss keys to more loss tensors











      ..
          !! processed by numpydoc !!


   .. py:method:: eval(sess: deepmd.tf.env.tf.Session, feed_dict: dict, natoms: numpy.ndarray) -> dict[str, Any]

      
      Eval the loss function.


      :Parameters:

          **sess** : :obj:`tf.Session`
              TensorFlow session

          **feed_dict** : :class:`python:dict`\[:obj:`tf.placeholder`, :obj:`tf.Tensor`]
              A dictionary that maps graph elements to values

          **natoms** : :obj:`tf.Tensor`
              number of atoms



      :Returns:

          :class:`python:dict`
              A dictionary that maps keys to values. It
              should contain key `natoms`











      ..
          !! processed by numpydoc !!


   .. py:property:: label_requirement
      :type: list[deepmd.utils.data.DataRequirementItem]


      
      Return data label requirements needed for this loss calculation.
















      ..
          !! processed by numpydoc !!


