docstr: Computes trend based on model configuration.
  
  Parameters
  ----------
      t : torch.Tensor float
          normalized time, dim: (batch, n_forecasts)
      meta: dict
          Metadata about the all the samples of the model input batch. Contains the following:
              * ``df_name`` (list, str), time series ID corresponding to each sample of the input batch.
  Returns
  -------
      torch.Tensor
          Trend component, same dimensions as input t
docstr_tok: ["Computes","trend","based","on","model","configuration",".","Parameters","--","--","--","--","--","t",":","torch.Tensor","float","normalized","time",",","dim",":","(","batch",",","n_forecasts",")","meta",":","dict","Metadata","about","the","all","the","samples","of","the","model","input","batch",".","Contains","the","following",":","*","``","df_name","``","(","list",",","str",")",",","time","series","ID","corresponding","to","each","sample","of","the","input","batch",".","Returns","--","--","--","-","torch.Tensor","Trend","component",",","same","dimensions","as","input","t"]
code: def forward(self, t, meta):
      """Computes trend based on model configuration.
  
      Parameters
      ----------
          t : torch.Tensor float
              normalized time, dim: (batch, n_forecasts)
          meta: dict
              Metadata about the all the samples of the model input batch. Contains the following:
                  * ``df_name`` (list, str), time series ID corresponding to each sample of the input batch.
      Returns
      -------
          torch.Tensor
              Trend component, same dimensions as input t
  
      """
      # From the dataloader meta data, we get the one-hot encoding of the df_name.
      if self.config_trend.trend_global_local == "local":
          # dimensions - batch , num_time_series
          meta_name_tensor_one_hot = nn.functional.one_hot(
              meta, num_classes=len(self.id_list)
          )
      else:
          meta_name_tensor_one_hot = None
  
      # Variables identifying, for t, the corresponding trend segment (for each sample of the batch).
      past_next_changepoint = t.unsqueeze(
          dim=2
      ) >= self.trend_changepoints_t[1:].unsqueeze(dim=0)
      segment_id = past_next_changepoint.sum(dim=2)
      # = dimensions - batch_size, n_forecasts, segments (+ 1)
      current_segment = nn.functional.one_hot(
          segment_id, num_classes=self.config_trend.n_changepoints + 1
      )
  
      # Computing k_t.
      # dimensions - batch_size, n_forecasts, quantiles_size
      k_t = self.compute_k_t(
          current_segment,
          past_next_changepoint,
          meta_name_tensor_one_hot,
      )
  
      # Computing m_t.
      # dimensions - batch_size, n_forecasts, quantiles_size
      m_t = self.compute_m_t(
          current_segment,
          past_next_changepoint,
          meta_name_tensor_one_hot,
      )
  
      # Computing trend value at time(t) for each batch sample.
      # dimensions - batch_size, n_forecasts, quantiles_size
      trend = self.compute_trend(t, k_t, m_t, meta_name_tensor_one_hot)
  
      return self.bias.unsqueeze(dim=0).unsqueeze(dim=0) + trend
  
imports: import numpy
  import torch
  import torch.nn
  from neuralprophet.components.trend import Trend
  from neuralprophet.utils_torch import init_parameter
label_desc: Use image node_id 2 for calling the PiecewiseLinearTrend obj's underlying member method code with example usage: obj.forward(t, meta) and returns: unknown