This commit is contained in:
Ftps 2023-04-29 13:11:13 +09:00 committed by GitHub
parent 4cb010bac6
commit b12e33891c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class Config:
print("16系显卡强制单精度")
self.is_half = False
for config_file in ["32k.json", "40k.json", "48k.json"]:
with open(f"configs/{config_file}", "a") as f:
with open(f"configs/{config_file}", "r+") as f:
strr = f.read().replace("true", "false")
f.write(strr)
self.gpu_mem = int(
@ -73,7 +73,7 @@ class Config:
+ 0.4
)
if self.gpu_mem <= 4:
with open("trainset_preprocess_pipeline_print.py", "a") as f:
with open("trainset_preprocess_pipeline_print.py", "r+") as f:
strr = f.read().replace("3.7", "3.0")
f.write(strr)
elif torch.backends.mps.is_available():