import torch


def expand_NN_biases_torch(NN_biases_in, dim_in):
    """
    INPUTS:
    NN_biases_in: A list of torch vectors that are the biases of the original NN
    dim_in: An int, dimension of the input state-space
    OUTPUT:
    NN_biases_out: A list of torch matrices that are the "expanded" biases of the NN. See comments for
    expand_NN_weights_torch() for definition of an "expanded" NN.
    """

    # preallocate the output
    NN_biases_out = []

    # biases of the "expanded" NN is just the orignal bias with zeros of length dim_in stacked on top
    for i in range(len(NN_biases_in)):
        NN_biases_out.append(torch.cat((torch.zeros(dim_in, 1), NN_biases_in[i]), 0))

    return NN_biases_out