class_docstr: Dataset to be used for training the AlphaTensor algorithm using both
  actor generated and synthetic data. A basis change can be applied to both
  the data type with a probability specified in the constructor. The
  synthetic data and the actor generated one are stored in two data buffers.
docstr: Build the input tensor for the game. The input tensor has shape
  (action_memory_len+1, matrix_size**2, matrix_size**2, matrix_size**2).
  The first slice represent the matrix multiplication tensor which will
  be reduced by the TensorGame algorithm. The other slices represent the
  action memory.
docstr_tok: ["Build","the","input","tensor","for","the","game",".","The","input","tensor","has","shape","(","action_memory_len+1",",","matrix_size","*","*","2",",","matrix_size","*","*","2",",","matrix_size","*","*","2",")",".","The","first","slice","represent","the","matrix","multiplication","tensor","which","will","be","reduced","by","the","TensorGame","algorithm",".","The","other","slices","represent","the","action","memory","."]
code: def _build_tensor_game_input(
      dim_1: int, dim_k: int, dim_2: int, action_memory_len: int
  ):
      """Build the input tensor for the game. The input tensor has shape
      (action_memory_len+1, matrix_size**2, matrix_size**2, matrix_size**2).
      The first slice represent the matrix multiplication tensor which will
      be reduced by the TensorGame algorithm. The other slices represent the
      action memory.
      """
      input_tensor = torch.zeros(
          action_memory_len + 1,
          dim_1 * dim_k,
          dim_k * dim_2,
          dim_1 * dim_2,
      )
      for r in range(dim_1 * dim_2):
          for k in range(dim_k):
              input_tensor[
                  0, (r // dim_2) * dim_k + k, k * dim_2 + r % dim_2, r
              ] = 1
      return input_tensor
  
imports: import json
  import os
  import shutil
  import tempfile
  from pathlib import Path
  from typing import List, Tuple
  import numpy
  import torch
  from torch.utils.data import Dataset
  from open_alpha_tensor.core.data.generation import generate_synthetic_data
  from open_alpha_tensor.core.data.utils import get_scalars, map_triplet_to_action
label_desc: Use image node_id 11 for calling the TensorGameDataset obj's underlying member method code with example usage: obj._build_tensor_game_input(dim_1, dim_k, dim_2, action_memory_len) and returns: input_tensor