class_docstr: The network architecture proposed in `OPD <https://seqml.github.io/opd/opd_aaai21_supplement.pdf>`_.
  
  At every time step the input of policy network is divided into two parts,
  the public variables and the private variables. which are handled by ``raw_rnn``
  and ``pri_rnn`` in this network, respectively.
  
  One minor difference is that, in this implementation, we don't assume the direction to be fixed.
  Thus, another ``dire_fc`` is added to produce an extra direction-related feature.
class_docstr_tok: ["The","network","architecture","proposed","in","`","OPD","<","https",":","\/\/seqml.github.io\/opd\/opd_aaai21_supplement.pdf",">","`","_",".","At","every","time","step","the","input","of","policy","network","is","divided","into","two","parts",",","the","public","variables","and","the","private","variables",".","which","are","handled","by","``","raw_rnn","``","and","``","pri_rnn","``","in","this","network",",","respectively",".","One","minor","difference","is","that",",","in","this","implementation",",","we","do","n't","assume","the","direction","to","be","fixed",".","Thus",",","another","``","dire_fc","``","is","added","to","produce","an","extra","direction-related","feature","."]
docstr: Input should be a dict (at least) containing:
  
  - data_processed: [N, T, C]
  - cur_step: [N]  (int)
  - cur_time: [N]  (int)
  - position_history: [N, S]  (S is number of steps)
  - target: [N]
  - num_step: [N]  (int)
  - acquiring: [N]  (0 or 1)
docstr_tok: ["Input","should","be","a","dict","(","at","least",")","containing",":","-","data_processed",":","[","N",",","T",",","C","]","-","cur_step",":","[","N","]","(","int",")","-","cur_time",":","[","N","]","(","int",")","-","position_history",":","[","N",",","S","]","(","S","is","number","of","steps",")","-","target",":","[","N","]","-","num_step",":","[","N","]","(","int",")","-","acquiring",":","[","N","]","(","0","or","1",")"]
code: def forward(self, batch: Batch) -> torch.Tensor:
      """
      Input should be a dict (at least) containing:
  
      - data_processed: [N, T, C]
      - cur_step: [N]  (int)
      - cur_time: [N]  (int)
      - position_history: [N, S]  (S is number of steps)
      - target: [N]
      - num_step: [N]  (int)
      - acquiring: [N]  (0 or 1)
      """
  
      inp = cast(FullHistoryObs, batch)
      device = inp["data_processed"].device
  
      sources, _ = self._source_features(inp, device)
      assert len(sources) == self.num_sources
  
      out = torch.cat(sources, -1)
      return self.fc(out)
  
file_path: qlib/qlib/rl/order_execution/network.py
imports: from __future__ import annotations
  from typing import List, Tuple, cast
  import torch
  import torch.nn
  from tianshou.data import Batch
  from qlib.typehint import Literal
  from .interpreter import FullHistoryObs
label_desc: Use image node_id 4 for calling the Recurrent obj's underlying member method code with example usage: obj.forward(batch) and returns: self