From f9848709ba2655635dd9050dbc9db6e52a4ad74d Mon Sep 17 00:00:00 2001 From: liuzxtest02 <134442@163.com> Date: Fri, 3 Nov 2023 10:32:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'gpu=5Fmnist=5Fexample/tra?= =?UTF-8?q?in=5Fgpu.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gpu_mnist_example/train_gpu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpu_mnist_example/train_gpu.py b/gpu_mnist_example/train_gpu.py index f163b42..f83a473 100644 --- a/gpu_mnist_example/train_gpu.py +++ b/gpu_mnist_example/train_gpu.py @@ -12,7 +12,7 @@ If there are Chinese comments in the code,please add at the beginning: ''' - +import os from model import Model import numpy as np import torch @@ -22,10 +22,10 @@ from torch.optim import SGD from torch.utils.data import DataLoader from torchvision.transforms import ToTensor import argparse -import os #导入openi包 from openi.context import prepare, upload_openi +os.system("pip install -U openi_test") # Training settings parser = argparse.ArgumentParser(description='PyTorch MNIST Example') parser.add_argument('--epoch_size', type=int, default=10, help='how much epoch to train')