model/train_nn_v2.py
def flatten_3d_to_2d(raw_file_data):
    """
    Flatten the raw 3D file data to 2D.

    Args:
        raw_file_data: A 3D nested list.

    Returns:
        file_data_2d: A 2D nested list
        lens: A list of integers recording the number of files in each CL.
    """
    file_data_2d = []
    lens = []
    for lst in raw_file_data:
        lens.append(len(lst))
        for e in lst:
            file_data_2d.append(e)
    return file_data_2d, lens

    Flatten the raw 3D file data to 2D.

    Args:
        raw_file_data: A 3D nested list.

    Returns:
        file_data_2d: A 2D nested list
        lens: A list of integers recording the number of files in each CL.
    
Flatten the raw 3D file data to 2D.
Flatten the raw 3D file data to 2D .
def flatten_3d_to_2d(raw_file_data):
    file_data_2d = []
    lens = []
    for lst in raw_file_data:
        lens.append(len(lst))
        for e in lst:
            file_data_2d.append(e)
    return file_data_2d, lens
def flatten_3d_to_2d ( raw_file_data ) : file_data_2d = [ ] lens = [ ] for lst in raw_file_data : lens . append ( len ( lst ) ) for e in lst : file_data_2d . append ( e ) return file_data_2d , lens
Flatten the raw 3D file data to 2D.
Flatten the raw 3D file data to 2D .
"""
    Flatten the raw 3D file data to 2D.

    Args:
        raw_file_data: A 3D nested list.

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