一、常用的切片操作
ref_img = item[0][0][:, ::4, ::4]
src_img = item[0][1][:, ::4, ::4]
src_img_tmp = src_img.permute(1, 2, 0).numpy()[:, :, ::-1]
二、Python写文件操作
Ref. How to write content in a file using Python
原文:https://www.cnblogs.com/Todd-Qi/p/10685376.html