1
0
Fork 0
mirror of synced 2024-06-24 17:20:59 +12:00

use path.exists

This commit is contained in:
nagadomi 2015-05-26 00:25:14 +09:00
parent c48c3eb017
commit 11ff1d54ce

View file

@ -59,7 +59,7 @@ local function convert_frames(opt)
end
fp:close()
for i = 1, #lines do
if file_exists(string.format(opt.o, i)) == false then
if path.exists(string.format(opt.o, i)) == false then
local x = image_loader.load_float(lines[i])
local new_x = nil
if opt.m == "noise" and opt.noise_level == 1 then
@ -97,16 +97,6 @@ local function convert_frames(opt)
end
end
function file_exists(name)
local f=io.open(name,"r")
if f~=nil then
io.close(f)
return true
else
return false
end
end
local function waifu2x()
local cmd = torch.CmdLine()
cmd:text()