fix open (#200)
This commit is contained in:
parent
4cb010bac6
commit
b12e33891c
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue