自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 pytorch_practice_model

      import copy import numpy as np import torch import torch.nn.functional as F from torch import nn START_TAG = "START" STOP_TAG = "STOP" def log_sum_exp(vec): max_score = torch.max(vec...

2019-02-22 08:59:35 169

原创 pytorch_practice_data manager

    import copy import pickle as cPickle import torch class DataManager(): def __init__(self, max_length=100, batch_size=20, data_type='train', tags=[]): self.index = 0 self.in...

2019-02-22 08:58:36 205

原创 pytorch_practice_main

举例 # -*- coding:utf-8 -*- import pickle import sys import yaml import torch import torch.optim as optim from data_manager import DataManager from model import BiLSTMCRF from utils import f1_score...

2019-02-22 08:47:20 248

原创 train model

  Train your experiment. Simply run python train.py --data_dir data/small --model_dir experiments/base_model It will instantiate a model and train it on the training set following the hyperparamet...

2019-02-21 08:40:56 751 2

原创 build vocab

"""Build vocabularies of words and tags from datasets""" import argparse from collections import Counter import json import os parser = argparse.ArgumentParser() parser.add_argument('--min_count_w...

2019-02-20 08:50:10 2263

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除