model/train_nn_v2.py
def pad_zeros(file_data, max_len, file_columns):
    """
    Pad zeros for the CLs that have number of files less than max_len

    Args:
        file_data: A 3D nested list.
        max_len: An integer of maximum number of files across all CLs.
        file_columns: A list of file level feature names.

    Returns:
        A 3D nested list with zeros padded.
    """
    padded_file_data = []
    for lst in file_data:
        lst_copy = deepcopy(lst)
        if len(lst_copy) < max_len:
            for i in range(max_len - len(lst)):
                zeros = [0 for _ in range(len(file_columns))]
                lst_copy.append(zeros)
        padded_file_data.append(lst_copy)
    padded_file_data = np.array(padded_file_data)
    return padded_file_data

    Pad zeros for the CLs that have number of files less than max_len

    Args:
        file_data: A 3D nested list.
        max_len: An integer of maximum number of files across all CLs.
        file_columns: A list of file level feature names.

    Returns:
        A 3D nested list with zeros padded.
    
Pad zeros for the CLs that have number of files less than max_len
Pad zeros for the CLs that have number of files less than max_len
def pad_zeros(file_data, max_len, file_columns):
    padded_file_data = []
    for lst in file_data:
        lst_copy = deepcopy(lst)
        if len(lst_copy) < max_len:
            for i in range(max_len - len(lst)):
                zeros = [0 for _ in range(len(file_columns))]
                lst_copy.append(zeros)
        padded_file_data.append(lst_copy)
    padded_file_data = np.array(padded_file_data)
    return padded_file_data
def pad_zeros ( file_data , max_len , file_columns ) : padded_file_data = [ ] for lst in file_data : lst_copy = deepcopy ( lst ) if len ( lst_copy ) < max_len : for i in range ( max_len - len ( lst ) ) : zeros = [ 0 for _ in range ( len ( file_columns ) ) ] lst_copy . append ( zeros ) padded_file_data . append ( lst_copy ) padded_file_data = np . array ( padded_file_data ) return padded_file_data
Pad zeros for the CLs that have number of files less than max_len
Pad zeros for the CLs that have number of files less than max_len
"""
    Pad zeros for the CLs that have number of files less than max_len

    Args:
        file_data: A 3D nested list.
        max_len: An integer of maximum number of files across all CLs.
        file_columns: A list of file level feature names.

    Returns:
        A 3D nested list with zeros padded.
    """
A 3D nested list with zeros padded.
A 3D nested list with zeros padded .
file_data
A 3D nested list.
A 3D nested list .
max_len
An integer of maximum number of files across all CLs.
An integer of maximum number of files across all CLs .
file_columns
A list of file level feature names.
A list of file level feature names .