tensorflow制作tfrecords文件TypeError: ‘*‘ has type str, but expected one of: bytes问题的解决_tensorflow

上面这种方法好像失败了:

在我的程序中是'image/filename': _bytes_feature(filename),   调用的,

所以  在调用之前我加了filename = filename.encode()  就可以了