class_docstr: A generalized version of all possible networks implemented using tensorflow.
class_docstr_tok: ["A","generalized","version","of","all","possible","networks","implemented","using","tensorflow","."]
docstr: Search for a component[s] which has a return_type set to the to the requested PredictionType, and get
  predictions for it.
  
  :param states: The input states to the network.
  :param prediction_type: The requested PredictionType to look for in the network components
  :return: A dictionary with predictions for all components matching the requested prediction type
docstr_tok: ["Search","for","a","component","[","s","]","which","has","a","return_type","set","to","the","to","the","requested","PredictionType",",","and","get","predictions","for","it",".",":","param","states",":","The","input","states","to","the","network",".",":","param","prediction_type",":","The","requested","PredictionType","to","look","for","in","the","network","components",":","return",":","A","dictionary","with","predictions","for","all","components","matching","the","requested","prediction","type"]
code: def predict_with_prediction_type(
      self,
      states: Dict[str, np.ndarray],
      prediction_type: PredictionType,
  ) -> Dict[str, np.ndarray]:
      """
      Search for a component[s] which has a return_type set to the to the requested PredictionType, and get
      predictions for it.
  
      :param states: The input states to the network.
      :param prediction_type: The requested PredictionType to look for in the network components
      :return: A dictionary with predictions for all components matching the requested prediction type
      """
  
      ret_dict = {}
      for component in self.available_return_types[prediction_type]:
          ret_dict[component] = self.predict(
              inputs=states, outputs=component.output
          )
  
      return ret_dict
  
imports: import copy
  from types import MethodType
  from typing import Dict, List, Union
  import numpy
  import tensorflow
  from rl_coach.architectures.embedder_parameters import InputEmbedderParameters
  from rl_coach.architectures.head_parameters import HeadParameters
  from rl_coach.architectures.middleware_parameters import MiddlewareParameters
  from rl_coach.architectures.tensorflow_components.architecture import TensorFlowArchitecture
  from rl_coach.architectures.tensorflow_components import utils
  from rl_coach.base_parameters import AgentParameters, Device, DeviceType, EmbeddingMergerType
  from rl_coach.core_types import PredictionType
  from rl_coach.logger import screen
  from rl_coach.spaces import SpacesDefinition, PlanarMapsObservationSpace, TensorObservationSpace
  from rl_coach.utils import get_all_subclasses, dynamic_import_and_instantiate_module_from_params, indent_string
label_desc: Use image node_id 5 for calling the GeneralTensorFlowNetwork obj's underlying member method code with example usage: obj.predict_with_prediction_type(states, prediction_type) and returns: ret_dict