Add some clearer error messages

This commit is contained in:
darkliang
2021-12-29 17:14:03 +08:00
parent bddd552907
commit 19ed960b0a
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ class Plain(nn.Module):
cfg = cfg.split('-')
typ = cfg[0]
if typ not in ['BC', 'FC']:
raise AssertionError
raise ValueError('Only support BC or FC, but got {}'.format(typ))
out_c = int(cfg[1])
if typ == 'BC':