python/src/genetic_search.py
def _denormalize(
    normalized_netlist: np.ndarray, r: RangeInfo
) -> Tuple[Tuple[float, ...], Tuple[float, ...], Tuple[int, ...]]:
    """Returns the normalized netlist's floating point widths, floating point lengths and fingers"""
    ndevices = normalized_netlist.shape[0] // 3

    # Clip to ensure values are valid
    quantized_widths = normalized_netlist[:ndevices].clip(0, len(r.widths) - 1)
    quantized_lengths = normalized_netlist[ndevices:-ndevices].clip(0, len(r.lengths) - 1)
    quantized_fingers = normalized_netlist[-ndevices:].clip(0, len(r.fingers) - 1)
    return (
        tuple(float(r.widths[w]) for w in quantized_widths),
        tuple(float(r.lengths[l]) for l in quantized_lengths),
        tuple(r.fingers[f] for f in quantized_fingers),
    )
Returns the normalized netlist's floating point widths, floating point lengths and fingers
Returns the normalized netlist's floating point widths, floating point lengths and fingers
Returns the normalized netlist ' s floating point widths floating point lengths and fingers
def _denormalize(
    normalized_netlist: np.ndarray, r: RangeInfo
) -> Tuple[Tuple[float, ...], Tuple[float, ...], Tuple[int, ...]]:
    ndevices = normalized_netlist.shape[0] // 3
    quantized_widths = normalized_netlist[:ndevices].clip(0, len(r.widths) - 1)
    quantized_lengths = normalized_netlist[ndevices:-ndevices].clip(0, len(r.lengths) - 1)
    quantized_fingers = normalized_netlist[-ndevices:].clip(0, len(r.fingers) - 1)
    return (
        tuple(float(r.widths[w]) for w in quantized_widths),
        tuple(float(r.lengths[l]) for l in quantized_lengths),
        tuple(r.fingers[f] for f in quantized_fingers),
    )
def _denormalize ( normalized_netlist : np . ndarray , r : RangeInfo ) -> Tuple [ Tuple [ float , ... ] , Tuple [ float , ... ] , Tuple [ int , ... ] ] : ndevices = normalized_netlist . shape [ 0 ] // 3 quantized_widths = normalized_netlist [ : ndevices ] . clip ( 0 , len ( r . widths ) - 1 ) quantized_lengths = normalized_netlist [ ndevices : - ndevices ] . clip ( 0 , len ( r . lengths ) - 1 ) quantized_fingers = normalized_netlist [ - ndevices : ] . clip ( 0 , len ( r . fingers ) - 1 ) return ( tuple ( float ( r . widths [ w ] ) for w in quantized_widths ) , tuple ( float ( r . lengths [ l ] ) for l in quantized_lengths ) , tuple ( r . fingers [ f ] for f in quantized_fingers ) , )
Returns the normalized netlist's floating point widths, floating point lengths and fingers
Returns the normalized netlist ' s floating point widths floating point lengths and fingers
"""Returns the normalized netlist's floating point widths, floating point lengths and fingers""" # Clip to ensure values are valid
normalized_netlist
np.ndarray
r
RangeInfo