class_docstr: Linear layer following cosine basis functions.
  
  Args:
      n_basis_functions (int): Number of cosine basis functions.
      out_size (int): Output size.
docstr: Evaluate.
  
  Args:
      x (torch.Tensor): Input.
  
  Returns:
      torch.Tensor: Output with shape of (x.shape + (out_size,)).
docstr_tok: ["Evaluate",".","Args",":","x","(","torch.Tensor",")",":","Input",".","Returns",":","torch.Tensor",":","Output","with","shape","of","(","x.shape","+","(","out_size",",",")",")","."]
code: def forward(self, x):
      """Evaluate.
  
      Args:
          x (torch.Tensor): Input.
  
      Returns:
          torch.Tensor: Output with shape of (x.shape + (out_size,)).
      """
      h = cosine_basis_functions(x, self.n_basis_functions)
      h = h.reshape(-1, self.n_basis_functions)
      out = self.linear(h)
      out = out.reshape(*x.shape, self.out_size)
      return out
  
imports: import numpy
  import torch
  from torch import nn
  from pfrl.action_value import QuantileDiscreteActionValue
  from pfrl.agents import dqn
  from pfrl.nn import Recurrent
  from pfrl.utils.recurrent import one_step_forward, pack_and_forward
label_desc: Use image node_id 2 for calling the CosineBasisLinear obj's underlying member method code with example usage: obj.forward(x) and returns: out