(xshape)
return (nin, nsteps)
Helper function to interpret the tensor layout of preceding layer for input
    to a recurrent layer. Handles non-recurrent, recurrent, and local layers
Helper function to interpret the tensor layout of preceding layer for input
    to a recurrent layer. Handles non-recurrent, recurrent, and local layers
Helper function to interpret the tensor layout of preceding layer for input to a recurrent layer . Handles non - recurrent recurrent and local layers
def interpret_in_shape(xshape):
    """
    Helper function to interpret the tensor layout of preceding layer for input
    to a recurrent layer. Handles non-recurrent, recurrent, and local layers
    """
    if isinstance(xshape, int):
        nin, nsteps = xshape, 1
    else:
        if len(xshape) == 2:
            nin, nsteps = xshape
        else:
            nin = np.prod(xshape[:-1])
            nsteps = xshape[-1]
    return (nin, nsteps)
def interpret_in_shape ( xshape ) : if isinstance ( xshape , int ) : nin , nsteps = xshape , 1 else : if len ( xshape ) == 2 : nin , nsteps = xshape else : nin = np . prod ( xshape [ : - 1 ] ) nsteps = xshape [ - 1 ] return ( nin , nsteps )