class_docstr: A predictor which serializes the network structure using the JSON-
  serialization methods located in `gluonts.core.serde`. Use the following
  logic to create a `RepresentableBlockPredictor` from a trained prediction
  network.
  
  >>> def create_representable_block_predictor(
  ...        prediction_network: mx.gluon.HybridBlock,
  ...        **kwargs
  ... ) -> RepresentableBlockPredictor:
  ...    return RepresentableBlockPredictor(
  ...        prediction_net=prediction_network,
  ...        **kwargs
  ...    )
class_docstr_tok: ["A","predictor","which","serializes","the","network","structure","using","the","JSON-","serialization","methods","located","in","`","gluonts.core.serde","`",".","Use","the","following","logic","to","create","a","`","RepresentableBlockPredictor","`","from","a","trained","prediction","network",".",">",">",">","def","create_representable_block_predictor","(","...","prediction_network",":","mx.gluon.HybridBlock",",","...","*","*","kwargs","...",")","-",">","RepresentableBlockPredictor",":","...","return","RepresentableBlockPredictor","(","...","prediction_net=prediction_network",",","...","*","*","kwargs","...",")"]
code: def __init__(
      self,
      prediction_net,
      batch_size: int,
      prediction_length: int,
      ctx: mx.Context,
      input_transform: Transformation,
      lead_time: int = 0,
      forecast_generator: ForecastGenerator = SampleForecastGenerator(),
      output_transform: Optional[
          Callable[[DataEntry, np.ndarray], np.ndarray]
      ] = None,
      dtype: Type = np.float32,
  ) -> None:
      super().__init__(
          input_names=get_hybrid_forward_input_names(
              type(prediction_net)
          ),
          prediction_net=prediction_net,
          batch_size=batch_size,
          prediction_length=prediction_length,
          ctx=ctx,
          input_transform=input_transform,
          lead_time=lead_time,
          forecast_generator=forecast_generator,
          output_transform=output_transform,
          dtype=dtype,
      )
  
imports: import logging
  from functools import partial
  from pathlib import Path
  from typing import Callable, Iterator, List, Optional, Type
  import mxnet
  import numpy
  from gluonts.core.serde import dump_json, load_json
  from gluonts.dataset.common import DataEntry, Dataset
  from gluonts.dataset.loader import DataBatch, InferenceDataLoader
  from gluonts.model.forecast import Forecast
  from gluonts.model.forecast_generator import ForecastGenerator, SampleForecastGenerator, to_numpy
  from gluonts.model.predictor import OutputTransform, Predictor
  from gluonts.mx.batchify import batchify
  from gluonts.mx.component import equals
  from gluonts.mx.context import get_mxnet_context
  from gluonts.mx.util import export_repr_block, export_symb_block, get_hybrid_forward_input_names, hybrid_block_to_symbol_block, import_repr_block, import_symb_block
  from gluonts.transform import Transformation
label_desc: Use image node_id 1 to create a new RepresentableBlockPredictor object from inherited base classes: GluonPredictor with example: obj = RepresentableBlockPredictor(prediction_net, batch_size, prediction_length, ctx, input_transform, lead_time, forecast_generator, output_transform, dtype)