model/train_nn_v2.py
def expand_2d_to_3d(file_data_2d, lens):
    """
    Restore the 2D file data back to 3D.

    Args:
        file_data_2d: A 2D nested list
        lens: A list of integers recording the number of files in each CL.

    Returns:
        A 3D nested list.
    """
    restore_3d_file_data = []
    prefix_train = 0
    for l in lens:
        restore_3d_file_data.append(
            file_data_2d[prefix_train:prefix_train + l].tolist())
        prefix_train += l
    return restore_3d_file_data

    Restore the 2D file data back to 3D.

    Args:
        file_data_2d: A 2D nested list
        lens: A list of integers recording the number of files in each CL.

    Returns:
        A 3D nested list.
    
Restore the 2D file data back to 3D.
Restore the 2D file data back to 3D .
def expand_2d_to_3d(file_data_2d, lens):
    restore_3d_file_data = []
    prefix_train = 0
    for l in lens:
        restore_3d_file_data.append(
            file_data_2d[prefix_train:prefix_train + l].tolist())
        prefix_train += l
    return restore_3d_file_data
def expand_2d_to_3d ( file_data_2d , lens ) : restore_3d_file_data = [ ] prefix_train = 0 for l in lens : restore_3d_file_data . append ( file_data_2d [ prefix_train : prefix_train + l ] . tolist ( ) ) prefix_train += l return restore_3d_file_data
Restore the 2D file data back to 3D.
Restore the 2D file data back to 3D .
"""
    Restore the 2D file data back to 3D.

    Args:
        file_data_2d: A 2D nested list
        lens: A list of integers recording the number of files in each CL.

    Returns:
        A 3D nested list.
    """
A 3D nested list.
A 3D nested list .
file_data_2d
A 2D nested list
A 2D nested list
lens
A list of integers recording the number of files in each CL.
A list of integers recording the number of files in each CL .