attcks
This commit is contained in:
@@ -24,18 +24,7 @@ class Model(ABC):
|
||||
pass
|
||||
|
||||
'''
|
||||
Have to have a new param here as mode, for example it would be base, or retrain
|
||||
param mode = "base" or "retrain"
|
||||
that way I can save time it takes to train and retrain.
|
||||
file would be solved with Util functions
|
||||
log_file = Path(f"reports/{mode}/{self.__class__.__name__}/time_metrics.txt")
|
||||
Util._initialize_log_file(log_file):
|
||||
strt = time.perf_counter()
|
||||
end = time.perf_counter()
|
||||
and then save logs
|
||||
execution_time = end -strt
|
||||
Util.log_metric(log_file, execution_time: float):
|
||||
|
||||
|
||||
'''
|
||||
def train(self, epochs, loader, rate, mode = "retrain"):
|
||||
criterion = nn.CrossEntropyLoss()
|
||||
|
||||
Reference in New Issue
Block a user