class_docstr: AWD-LSTM inspired by https://arxiv.org/abs/1708.02182
class_docstr_tok: ["AWD-LSTM","inspired","by","https",":","\/\/arxiv.org\/abs\/1708.02182"]
code: def _change_one_hidden(self, l, bs):
      if self.bs < bs:
          nh = (
              self.n_hid if l != self.n_layers - 1 else self.emb_sz
          ) // self.n_dir
          return tuple(
              torch.cat(
                  [h, h.new_zeros(self.n_dir, bs - self.bs, nh)], dim=1
              )
              for h in self.hidden[l]
          )
      if self.bs > bs:
          return (
              self.hidden[l][0][:, :bs].contiguous(),
              self.hidden[l][1][:, :bs].contiguous(),
          )
      return self.hidden[l]
  
imports: from __future__ import annotations
  from ...data.all import *
  from ..core import *
label_desc: Use image node_id 6 for calling the AWD_LSTM obj's underlying member method code with example usage: obj._change_one_hidden(l, bs) and returns: self, tuple, self,  self