Summary on deep learning framework --- PyTorch Updated on 2018-07-22 21:25:42 import osos.environ["CUDA_VISIBLE_DEVICES"]="4" 1. install the pytorch version 0.1.11 ## Version 0.1.11 ## python2.7 and cuda 8.0 sudo pip install http://
Transformer注解及PyTorch实现 原文:http://nlp.seas.harvard.edu/2018/04/03/attention.html 作者:Alexander Rush 转载自机器之心:https://www.jiqizhixin.com/articles/2018-11-06-10?from=synced&keyword=transformer 在学习的过程中,将代码及排版整理了一下,方便阅读. "Attention is All You Need"
1.首先对给的数据进行划分,类型为每个类单独放在一个文件夹中 import json import shutil import os from glob import glob from tqdm import tqdm # 此文件的作用是创建每个类的文件夹,以及根据给出来的Json中已经做好的分类,对数据进行对号入座划分. # 加载json文件得出一个字典,然后根据Key值来提取每个文件到相应的文件夹中,(注意去除了不合理数据) try: for i in range(0,59): os.mk