Waifu2x Index / Waifu2x / Utils
Auto-generated documentation for waifu2x.utils module.
Namespace representing a series of key value pairs. Similar to argparse.Namespace.
class Namespace:
def __init__(self, kwargs: dict[str, Any]) -> None: ...Get a string representation of a namespace.
Type: str representation of a namespace
def __repr__(self) -> str: ...Get a string representation of a namespace.
Type: str representation of a namespace
def __str__(self) -> str: ...Append a new value and update the internal rep.
keystr - key to store a new value atvalueAny - corresponding value
def append(self, key: str, value: Any) -> None: ...def get_config(base, model, train: bool = True) -> Namespace: ...Get a list of files given a directory.
directorystr - path to a directoryshufflebool - use random.shuffle to change the order of returned files, defaults to False
Type: list[str] list of file paths
def load_filelist(directory: str, shuffle: bool = False) -> list[str]: ...Set a seed given an iv and a gpu index (note -1 is 'no gpu').
seedfloat - seed/ iv for randomgpuint - gpu index (-1 is no gpu), defaults to -1
def set_random_seed(seed: float, gpu: int = -1) -> None: ...