first commit
This commit is contained in:
16
dev/functions/saver/base.py
Normal file
16
dev/functions/saver/base.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Dict
|
||||
import torch
|
||||
|
||||
|
||||
class BaseSaver(ABC):
|
||||
def __init__(self, output_dir: str):
|
||||
self.output_dir = output_dir
|
||||
|
||||
@abstractmethod
|
||||
def save(
|
||||
self,
|
||||
state_dict: Dict[str, torch.Tensor],
|
||||
src_file: str,
|
||||
):
|
||||
pass
|
||||
Reference in New Issue
Block a user