class_docstr: Base class for discrete DQN net builder.
class_docstr_tok: ["Base","class","for","discrete","DQN","net","builder","."]
docstr: Returns softmax(1) - softmax(0)
docstr_tok: ["Returns","softmax","(","1",")","-","softmax","(","0",")"]
code: def build_binary_difference_scorer(
      self,
      q_network: ModelBase,
      state_normalization_data: NormalizationData,
      action_names: List[str],
      state_feature_config: rlt.ModelFeatureConfig,
  ) -> torch.nn.Module:
      """
      Returns softmax(1) - softmax(0)
      """
      assert len(action_names) == 2
      state_preprocessor = Preprocessor(
          state_normalization_data.dense_normalization_parameters, False
      )
      binary_difference_scorer_with_preprocessor = (
          BinaryDifferenceScorerWithPreprocessor(
              q_network.cpu_model().eval(),
              state_preprocessor,
              state_feature_config,
          )
      )
      return BinaryDifferenceScorerPredictorWrapper(
          binary_difference_scorer_with_preprocessor,
          state_feature_config,
      )
  
file_path: ReAgent/reagent/net_builder/discrete_dqn_net_builder.py
imports: import abc
  from typing import List
  import reagent.core.types
  import torch
  from reagent.core.fb_checker import IS_FB_ENVIRONMENT
  from reagent.core.parameters import NormalizationData
  from reagent.models.base import ModelBase
  from reagent.prediction.predictor_wrapper import BinaryDifferenceScorerWithPreprocessor, DiscreteDqnWithPreprocessor
  from reagent.preprocessing.normalization import get_num_output_features
  from reagent.preprocessing.preprocessor import Preprocessor
label_desc: Use image node_id 4 for calling the DiscreteDQNNetBuilder obj's underlying member method code with example usage: obj.build_binary_difference_scorer(q_network, state_normalization_data, action_names, state_feature_config) and returns: BinaryDifferenceScorerPredictorWrapper