word = ex[2].eval(session = sion)
print(word)
tensor变numpy:
pos = ex[3].numpy()
英文在tensor中转为numpy后成为字节b’aa’,转为编码**‘aa’**
''.join(w.decode('ascii'))
注:不加’‘.join()只有aa,没有引号
word = ex[2].eval(session = sion)
print(word)
tensor变numpy:
pos = ex[3].numpy()
英文在tensor中转为numpy后成为字节b’aa’,转为编码**‘aa’**
''.join(w.decode('ascii'))
注:不加’‘.join()只有aa,没有引号