hako-mikan 2025-01-16 19:16:25 +09:00
parent b59c19f471
commit 3b9694a08b
1 changed files with 1 additions and 1 deletions

View File

@ -68,5 +68,5 @@ def factorization(dimension: int, factor:int=-1) -> tuple[int, int]:
return m, n
def cpufloat(module):
if not module: return module #None対策
if module is None: return module #None対策
return module.to(torch.float) if module.device.type == "cpu" else module