Spaces:
Running
on
Zero
Running
on
Zero
File size: 422 Bytes
9e15541 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from .base_loss import BaseLoss
from .reconstruction_loss import ReconstructionLoss
from .stego_loss import StegoLoss
def make_loss(config) -> BaseLoss:
loss_type = config["type"]
match loss_type:
case "reconstruction":
return ReconstructionLoss(config)
case "stego":
return StegoLoss(config)
case _:
raise ValueError(f"Unknown loss type {loss_type}")
|