docstr: Value Head for predicting state values.
  :param agent_parameters: containing algorithm parameters, but currently unused.
  :param spaces: containing action spaces, but currently unused.
  :param network_name: name of head network. currently unused.
  :param head_type_idx: index of head network. currently unused.
  :param loss_weight: scalar used to adjust relative weight of loss (if using this loss with others).
  :param is_local: flag to denote if network is local. currently unused.
  :param activation_function: activation function to use between layers. currently unused.
  :param dense_layer: type of dense layer to use in network. currently unused.
  :param loss_type: loss function with default of mean squared error (i.e. L2Loss), or alternatively HuberLoss.
docstr_tok: ["Value","Head","for","predicting","state","values",".",":","param","agent_parameters",":","containing","algorithm","parameters",",","but","currently","unused",".",":","param","spaces",":","containing","action","spaces",",","but","currently","unused",".",":","param","network_name",":","name","of","head","network",".","currently","unused",".",":","param","head_type_idx",":","index","of","head","network",".","currently","unused",".",":","param","loss_weight",":","scalar","used","to","adjust","relative","weight","of","loss","(","if","using","this","loss","with","others",")",".",":","param","is_local",":","flag","to","denote","if","network","is","local",".","currently","unused",".",":","param","activation_function",":","activation","function","to","use","between","layers",".","currently","unused",".",":","param","dense_layer",":","type","of","dense","layer","to","use","in","network",".","currently","unused",".",":","param","loss_type",":","loss","function","with","default","of","mean","squared","error","(","i.e",".","L2Loss",")",",","or","alternatively","HuberLoss","."]
code: def __init__(
      self,
      agent_parameters: AgentParameters,
      spaces: SpacesDefinition,
      network_name: str,
      head_type_idx: int = 0,
      loss_weight: float = 1.0,
      is_local: bool = True,
      activation_function: str = "relu",
      dense_layer: None = None,
      loss_type: Union[HuberLoss, L2Loss] = L2Loss,
  ):
      """
      Value Head for predicting state values.
      :param agent_parameters: containing algorithm parameters, but currently unused.
      :param spaces: containing action spaces, but currently unused.
      :param network_name: name of head network. currently unused.
      :param head_type_idx: index of head network. currently unused.
      :param loss_weight: scalar used to adjust relative weight of loss (if using this loss with others).
      :param is_local: flag to denote if network is local. currently unused.
      :param activation_function: activation function to use between layers. currently unused.
      :param dense_layer: type of dense layer to use in network. currently unused.
      :param loss_type: loss function with default of mean squared error (i.e. L2Loss), or alternatively HuberLoss.
      """
      super(VHead, self).__init__(
          agent_parameters,
          spaces,
          network_name,
          head_type_idx,
          loss_weight,
          is_local,
          activation_function,
          dense_layer,
      )
      assert (loss_type == L2Loss) or (
          loss_type == HuberLoss
      ), "Only expecting L2Loss or HuberLoss."
      self.loss_type = loss_type
      self.return_type = VStateValue
      with self.name_scope():
          self.dense = nn.Dense(
              units=1, weight_initializer=NormalizedRSSInitializer(1.0)
          )
  
file_path: coach/rl_coach/architectures/mxnet_components/heads/v_head.py
imports: from typing import Union, List, Tuple
  from types import ModuleType
  import mxnet
  from mxnet.gluon.loss import Loss, HuberLoss, L2Loss
  from mxnet.gluon import nn
  from rl_coach.architectures.mxnet_components.heads.head import Head, HeadLoss, LossInputSchema, NormalizedRSSInitializer
  from rl_coach.architectures.mxnet_components.heads.head import LOSS_OUT_TYPE_LOSS
  from rl_coach.base_parameters import AgentParameters
  from rl_coach.core_types import VStateValue
  from rl_coach.spaces import SpacesDefinition
label_desc: Use image node_id 1 to create a new VHead object from inherited base classes: Head with example: obj = VHead(agent_parameters, spaces, network_name, head_type_idx, loss_weight, is_local, activation_function, dense_layer, loss_type)