docstr: Create input vector into RNN network
  
  Args:
      one_off_target: tensor to insert into first position of target. If None (default), remove first time step.
docstr_tok: ["Create","input","vector","into","RNN","network","Args",":","one_off_target",":","tensor","to","insert","into","first","position","of","target",".","If","None","(","default",")",",","remove","first","time","step","."]
code: def construct_input_vector(
      self,
      x_cat: torch.Tensor,
      x_cont: torch.Tensor,
      one_off_target: torch.Tensor = None,
  ) -> torch.Tensor:
      """
      Create input vector into RNN network
  
      Args:
          one_off_target: tensor to insert into first position of target. If None (default), remove first time step.
      """
      # create input vector
      if len(self.categoricals) > 0:
          embeddings = self.embeddings(x_cat)
          flat_embeddings = torch.cat(
              [emb for emb in embeddings.values()], dim=-1
          )
          input_vector = flat_embeddings
  
      if len(self.reals) > 0:
          input_vector = x_cont.clone()
  
      if len(self.reals) > 0 and len(self.categoricals) > 0:
          input_vector = torch.cat([x_cont, flat_embeddings], dim=-1)
  
      # shift target by one
      input_vector[..., self.target_positions] = torch.roll(
          input_vector[..., self.target_positions], shifts=1, dims=1
      )
  
      if (
          one_off_target is not None
      ):  # set first target input (which is rolled over)
          input_vector[:, 0, self.target_positions] = one_off_target
      else:
          input_vector = input_vector[:, 1:]
  
      # shift target
      return input_vector
  
file_path: pytorch-forecasting/pytorch_forecasting/models/rnn/__init__.py
imports: from copy import copy
  from typing import Dict, List, Tuple, Union
  import numpy
  import torch
  import torch.nn
  from pytorch_forecasting.data.encoders import MultiNormalizer, NaNLabelEncoder
  from pytorch_forecasting.data.timeseries import TimeSeriesDataSet
  from pytorch_forecasting.metrics import MAE, MAPE, MASE, RMSE, SMAPE, MultiHorizonMetric, MultiLoss, QuantileLoss
  from pytorch_forecasting.models.base_model import AutoRegressiveBaseModelWithCovariates
  from pytorch_forecasting.models.nn import HiddenState, MultiEmbedding, get_rnn
  from pytorch_forecasting.utils import apply_to_list, to_list
label_desc: Use image node_id 3 for calling the RecurrentNetwork obj's underlying member method code with example usage: obj.construct_input_vector(x_cat, x_cont, one_off_target) and returns: input_vector