Batch.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:BRATS 作者: ahmedhussein622 项目源码 文件源码
def fast_load(self, file_name):
        file_name = file_name + "_extra"
        with open(file_name, 'rb') as f:
            (self.current_run, self.current_patient, self.patients[self.current_patient].current_voxel) =  pickle.load(f)



# Patient.find_patients()
# b = Batch_balanced(Patient.patients_list[0:10], 17)
# b.start_iteration()
# 
# k = 10000
# (X, y) = b.get_batch(k, two_class=True)
# b.stop_iteration()
# 
# 
# print("done ")
# print(X.shape)
# print(y.shape)
# 
# for i in range(0, k):
#     plt.imshow(X[i][0], cmap = "Greys_r")
#     plt.text(0, 0, "class : "+str(y[i]), color = "r")
#     plt.show()


# 
# b.set_current_location(1, 140, 0, 0)
# 
# b.start_iteration()
# 
# 
# print(b.get_current_location())
# print(b.has_next_batch())
# x, y = b.get_batch(10000000)
# print(x.shape)


# print(b.patients[b.current_patient].get_current_input())
# print(b.patients[b.current_patient].get_current_location())
# print(b.get_current_location())
# print(b.has_next_batch())
# 
# b.stop_iteration()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号