original_docstring: input is not chunk-first. During forward, first divide input into chunks
          and then first each chunks and reshape the output back to original format.
  
          Args:
              x (torch.Tensor): input with shape (B,C,D,H,W).
  
          Returns: torch.Tensor. The extract features.
              If `do_pooling` is True, the returned shape is (B, C1, D1),
              else is (B, C1, D1, H1, W1)
          
docstring: input is not chunk-first. During forward, first divide input into chunks
  and then first each chunks and reshape the output back to original format.
docstring_tokens: input is not chunk - first . During forward first divide input into chunks and then first each chunks and reshape the output back to original format .
code: def forward_nochunk_inp_output(self, x):
          """input is not chunk-first. During forward, first divide input into chunks
          and then first each chunks and reshape the output back to original format.
  
          Args:
              x (torch.Tensor): input with shape (B,C,D,H,W).
  
          Returns: torch.Tensor. The extract features.
              If `do_pooling` is True, the returned shape is (B, C1, D1),
              else is (B, C1, D1, H1, W1)
          """
          B, C, D, H, W = x.shape
          chunk_size = self.chunk_size
          pad_d = 0
          if D % chunk_size != 0:
              pad_d = chunk_size - (D % chunk_size)
              D = D + pad_d
              x = F.pad(x, (0, 0, 0, 0, 0, pad_d))
          num_chunks = D // chunk_size
          x = (
              x.reshape(B, C, num_chunks, chunk_size, H, W)
              .permute(0, 2, 1, 3, 4, 5)
              .reshape(B * num_chunks, C, chunk_size, H, W)
          )
          x = super().forward(x)  # shape: [n, c, d, h, w]
          _, c, d, h, w = x.shape
          x = (
              x.reshape(B, num_chunks, c, d, h, w)
              .permute(0, 2, 1, 3, 4, 5)
              .reshape(B, c, num_chunks * d, h, w)  # shape: [B, c, D//2, h, w]
          )
          x = x[:, :, : num_chunks * d - pad_d // 2, :, :].contiguous()
  
          if self.pool:
              x = self.pool(x)
              x = x.squeeze(-1).squeeze(-1)
          return x
code_tokens: def forward_nochunk_inp_output ( self , x ) : B , C , D , H , W = x . shape chunk_size = self . chunk_size pad_d = 0 if D % chunk_size != 0 : pad_d = chunk_size - ( D % chunk_size ) D = D + pad_d x = F . pad ( x , ( 0 , 0 , 0 , 0 , 0 , pad_d ) ) num_chunks = D // chunk_size x = ( x . reshape ( B , C , num_chunks , chunk_size , H , W ) . permute ( 0 , 2 , 1 , 3 , 4 , 5 ) . reshape ( B * num_chunks , C , chunk_size , H , W ) ) x = super ( ) . forward ( x ) _ , c , d , h , w = x . shape x = ( x . reshape ( B , num_chunks , c , d , h , w ) . permute ( 0 , 2 , 1 , 3 , 4 , 5 ) . reshape ( B , c , num_chunks * d , h , w ) ) x = x [ : , : , : num_chunks * d - pad_d // 2 , : , : ] . contiguous ( ) if self . pool : x = self . pool ( x ) x = x . squeeze ( - 1 ) . squeeze ( - 1 ) return x
short_docstring: input is not chunk-first.
short_docstring_tokens: input is not chunk - first .
comment: """input is not chunk-first. During forward, first divide input into chunks
          and then first each chunks and reshape the output back to original format.
  
          Args:
              x (torch.Tensor): input with shape (B,C,D,H,W).
  
          Returns: torch.Tensor. The extract features.
              If `do_pooling` is True, the returned shape is (B, C1, D1),
              else is (B, C1, D1, H1, W1)
          """$SEP$# shape: [n, c, d, h, w]$SEP$# shape: [B, c, D//2, h, w]