mirror of
https://github.com/marian-nmt/marian.git
synced 2024-11-03 20:13:47 +03:00
Add option -f for printing whole arrays
This commit is contained in:
parent
8c34648365
commit
9101c00d31
@ -37,7 +37,11 @@ def main():
|
||||
if args.key not in model:
|
||||
print("Key not found")
|
||||
exit(1)
|
||||
print(model[args.key])
|
||||
if args.full_matrix:
|
||||
for (x, y), val in np.ndenumerate(model[args.key]):
|
||||
print(val)
|
||||
else:
|
||||
print(model[args.key])
|
||||
else:
|
||||
for key in model:
|
||||
print(key)
|
||||
@ -49,6 +53,8 @@ def parse_args():
|
||||
parser.add_argument("-k", "--key", help="print value for specific key")
|
||||
parser.add_argument("-s", "--special", action="store_true",
|
||||
help="print values from special:model.yml node")
|
||||
parser.add_argument("-f", "--full-matrix", action="store_true",
|
||||
help="force numpy to print full arrays")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user