我正在尝试将我的Jpeg图像集转换为TFrecords。但是TFrecord文件比图像集占用了将近5倍的空间。在大量搜索之后,我了解到当JPEG被写入TFrecords时,它们不再是JPEG了。请告诉我,在下面的代码中需要做哪些修改才能将JPEG写入Tfrecords。# out_path File-path for the TFRecords output file.img_bytes = img.tostring()
# Create a dict with the
但是,我意识到二进制格式的大小要比文件大。这有什么原因吗?还是我做错了?book.pdf大小: 4,672,474字节,with open("book.pdf", "rb") as f: bbn_str = "".join(format(ord(i), "08b") for i in str(b))我本来