# -*- coding: UTF-8 -*- import sys sys.path.append("../../..") from managpu import GpuManager my_gpu = GpuManager() my_gpu.set_by_memory(1) import os import time import argparse from config import proj_cfg import torch import torcherry as tc from torcherry.utils.metric import MetricAccuracy, MetricLoss from torcherry.utils.checkpoint import CheckBestValAcc from torcherry.utils.util import set_env_seed from model.resnet_cifar10 import resnet20_cifar10, resnet32_cifar10 from model.resnet_tn_cifar10 import * Models = dict( resnet20_cifar10=resnet20_cifar10, resnet32_cifar10=resnet32_cifar10, TRResNet20_CIFAR10=TRResNet20_CIFAR10, TRResNet32_CIFAR10=TRResNet32_CIFAR10, BTTResNet20_CIFAR10=BTTResNet20_CIFAR10,
# -*- coding: utf-8 -*- # Author: Perry # @Create Time: 2019/6/4 14:56 from managpu import GpuManager if __name__ == '__main__': my_gpu = GpuManager() my_gpu.set_by_memory(1, 5)