提交 95f5c983 编写于 作者: X xiaohang

second version, works, fast, but hard to converge

上级 7641b0c0
......@@ -2,4 +2,4 @@
# imagepath label
# /ab/cd/image.jpg a:b:c:d
python main.py --trainlist data/train_list.txt --vallist data/test_list.txt --cuda --adam --lr=0.001
nohup python main.py --trainlist data/train_list.txt --vallist data/test_list.txt --cuda --adam --lr=0.001 > log.txt &
......@@ -62,8 +62,7 @@ class strLabelConverterForAttention(object):
if length.numel() == 1:
length = length[0]
assert t.numel() == length, "text with length: {} does not match declared length: {}".format(t.numel(), length)
if raw:
return ''.join([self.alphabet[i] for i in t])
return ''.join([self.alphabet[i] for i in t])
else:
# batch mode
assert t.numel() == length.sum(), "texts with length: {} does not match declared length: {}".format(t.numel(), length.sum())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册