1 Star 0 Fork 1

大数据驱动的类人智能感知与情感交互关键技术/NWPU-Crowd-Sample-Code

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
train.py 778 Bytes
一键复制 编辑 原始数据 按行查看 历史
隐匿人海 提交于 2019-12-16 17:28 . remove other dataset code
import os
import numpy as np
import torch
import datasets
from config import cfg
from importlib import import_module
#------------prepare enviroment------------
seed = cfg.SEED
if seed is not None:
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
gpus = cfg.GPU_ID
if len(gpus)==1:
torch.cuda.set_device(gpus[0])
torch.backends.cudnn.benchmark = True
#------------prepare data loader------------
data_mode = cfg.DATASET
datasetting = import_module(f'datasets.setting.{data_mode}')
cfg_data = datasetting.cfg_data
#------------Prepare Trainer------------
from trainer import Trainer
#------------Start Training------------
pwd = os.path.split(os.path.realpath(__file__))[0]
cc_trainer = Trainer(cfg_data, pwd)
cc_trainer.forward()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/USTC_HISAI/NWPU-Crowd-Sample-Code.git
git@gitee.com:USTC_HISAI/NWPU-Crowd-Sample-Code.git
USTC_HISAI
NWPU-Crowd-Sample-Code
NWPU-Crowd-Sample-Code
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385