mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
finished lightning module
This commit is contained in:
@@ -1228,13 +1228,13 @@ def convert(val):
|
||||
constructors = [int, float, str]
|
||||
|
||||
if type(val) is str:
|
||||
|
||||
if val.lower() == 'true':
|
||||
return True
|
||||
if val.lower() == 'false':
|
||||
return False
|
||||
|
||||
for c in constructors:
|
||||
|
||||
try:
|
||||
return c(val)
|
||||
except ValueError:
|
||||
|
||||
Reference in New Issue
Block a user