for t in tensors:
if 'buffer' in t:
if t['buffer'] in buffer_name_map:
- print 'find conflict!!'
- print t
- print buffer_name_map
+ print('find conflict!!')
+ print(t)
+ print(buffer_name_map)
comps = t['name'].split('/')
names = []
if len(comps) > 1 and comps[0] == comps[1]:
b = j['buffers'][i]
if 'data' in b:
if i not in buffer_name_map:
- print "buffer %d is not found in buffer_name_map. skip printing the buffer..."
+ print("buffer %d is not found in buffer_name_map. skip printing the buffer..."
+ % i)
continue
filename = "%s.npy" % (buffer_name_map[i]['name'])
elif len(shape) == 1:
pass
else:
- print "Undefined length: conversion skipped. shape=", shape
+ print("Undefined length: conversion skipped. shape=", shape)
#print shape, filename, n.shape
np.save(filename, n)
-print "Done."
+print("Done.")
elif 'builtin_options_type' in o:
# if we cannot find opcode_index, print option type instead.
op_name = o['builtin_options_type']
- print "Layer:", op_name
+ print("Layer:", op_name)
- print " Input shapes ---"
+ print(" Input shapes ---")
for inp in o['inputs']:
- print " ", tensors[inp]['shape']
- print " Output shapes ---"
+ print(" ", tensors[inp]['shape'])
+ print(" Output shapes ---")
for outp in o['outputs']:
- print " ", tensors[outp]['shape']
+ print(" ", tensors[outp]['shape'])