解决方法:
在DataSet初始化函数中,显示指明dtype为np.float32 self.datas = np.array(datas ,dtype=np.float32)
参考链接:
https://stackoverflow.com/questions/60020184/runtimeerror-expected-object-of-scalar-type-float-but-got-scalar-type-double-fo