2019年7月23日

卷积神经网络(demo)

摘要: import torch import torchvision as tv import torchvision.transforms as transforms import torch.nn as nn import torch.optim as optim import argparse # 定义是否使用GPU device = torch.device("cuda" if torch.c... 阅读全文

posted @ 2019-07-23 15:17 茯苓 阅读(402) 评论(0) 推荐(0) 编辑

批量更改图片名称

摘要: import os filepath = r'E:\ML\Pytorch\train\cleavage/' n= 0 if __name__ == "__main__": print("start") if not os.path.exists(filepath): print("目录不存在!!") os._exit(1) filename... 阅读全文

posted @ 2019-07-23 15:16 茯苓 阅读(153) 评论(0) 推荐(0) 编辑

批量设置图片大小

摘要: import os from PIL import Image filename = os.listdir("E:\\computer vision\\111\\test\\cleavage\\") base_dir = "E:\\computer vision\\111\\test\\cleavage\\" new_dir = "E:\\computer vision\\test\\cl... 阅读全文

posted @ 2019-07-23 15:15 茯苓 阅读(173) 评论(0) 推荐(0) 编辑

导航