forked from innovation-cat/DeepLearningBook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasiclib.py
More file actions
40 lines (33 loc) · 866 Bytes
/
basiclib.py
File metadata and controls
40 lines (33 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# coding: utf-8
#
# basiclib.py
#
# Author: Huang Anbu
# Date: 2017.3
#
# Description: Basic Configuration and Interface
#
# options: hyper-parameter setting
# n_words: the number of input layer units
# n_emb: the number of embedding layer units
# n_hidden: the number of hidden layer units
# n_output: the number of output layer units
# batch_size: the number of training set of each iteration
#
# Copyright©2017. All Rights Reserved.
# ===============================================================================================
import numpy
import theano
import theano.tensor as T
import os, sys, time
import itertools
import csv
import glob
import nltk
from collections import *
from nltk.corpus import stopwords
options = {'n_words':20001,
'n_emb':128,
'n_hidden':128,
'n_output':20001,
'batch_size':500}