mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-30 13:40:46 +08:00
finished lightning module
This commit is contained in:
1 parent
5e38ab259e
commit
8258d9c1c2
1 file changed
+1
-1
@@ -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