Spaces:
Runtime error
Runtime error
from abc import ABC, abstractmethod | |
from collections import OrderedDict | |
class abs_model(ABC): | |
""" Training Related Interface | |
""" | |
def setup_input(self, x): | |
pass | |
def forward(self, x): | |
pass | |
def supervise(self, input_x, y, is_training:bool)->float: | |
pass | |
def get_visualize(self) -> OrderedDict: | |
return {} | |
""" Inference Related Interface | |
""" | |
def inference(self, x): | |
pass | |
def batch_inference(self, x): | |
pass | |
""" Logging/Visualization Related Interface | |
""" | |
def get_logs(self): | |
pass | |
""" Getter & Setter | |
""" | |
def get_models(self) -> dict: | |
""" GAN may have two models | |
""" | |
pass | |
def get_optimizers(self) -> dict: | |
""" GAN may have two optimizer | |
""" | |
pass | |
def set_models(self, models) -> dict: | |
""" GAN may have two models | |
""" | |
pass | |
def set_optimizers(self, optimizers: dict): | |
""" GAN may have two optimizer | |
""" | |
pass | |