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)

   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


   .. py:attribute:: protect_value


   .. py:attribute:: log_fit


   .. py:attribute:: start_pref_dos


   .. py:attribute:: limit_pref_dos


   .. py:attribute:: start_pref_cdf


   .. py:attribute:: limit_pref_cdf


   .. py:attribute:: start_pref_ados


   .. py:attribute:: limit_pref_ados


   .. py:attribute:: start_pref_acdf


   .. py:attribute:: limit_pref_acdf


   .. py:attribute:: has_dos


   .. py:attribute:: has_cdf


   .. py:attribute:: has_ados


   .. py:attribute:: has_acdf


   .. py:method:: build(learning_rate, natoms, model_dict, label_dict, suffix)

      
      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, feed_dict, natoms)

      
      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 !!


