- 博客(8)
- 收藏
- 关注
原创 常用代码收集(更新中。。。)
1.train_acc ,train_loss可视化def save_model(epochs, model, optimizer, criterion): """ Function to save the trained model to disk. """ torch.save({ 'epoch': epochs, 'model_state_dict': model.state_dict(), .
2022-04-17 12:51:29
291
原创 最小外接矩形
输入:输出完整代码:import osimport pydicomimport matplotlib.pyplot as pltimport scipy.miscimport osimport pandas as pdimport SimpleITK as sitkimport pydicomimport numpy as npimport cv2import timeimport imageiofrom PIL import Imagefrom .
2022-04-10 12:18:29
3532
原创 目标检测yolov5:json文件转TXT
输入:输出;相关代码:import osimport jsonclass BDD_to_YOLOv5: def __init__(self): self.writepath = r"C:\Users\Wu\Desktop\cv test\\" #-----------------------------------------------------------# #self.writepath 保存最后生成的所有.
2022-04-07 09:32:13
3170
原创 专题-跨设备保存加载模型
pytorch_classification/deep_thoughts -bozhu/pytoch32 GPU/作业/gcn.py单击单卡:单机多卡:DataParallel单机多卡DDP:示例1:G:\deep-learn\deep-learning\pytorch_classification\train_multi_GPU\train_single_gpu.pytrain_single...
2022-04-07 09:21:12
79
原创 [...,1],[...,0]
a=torch.rand((2,2,2))print(a)tensor([[[0.6601, 0.5124], [0.1438, 0.2335]], [[0.5657, 0.0586], [0.0366, 0.1247]]])print(a[...,0])tensor([[0.6601, 0.1438], [0.5657, 0.0366]])print(a[...,1])tensor([[0.5124, 0.23.
2022-03-26 10:48:50
90
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人