"""
import os
import tensorflow as tf
import time
import Bi_LSTM
import Yelp

tf.set_random_seed(0)
## Setting GPU
os.environ['CUDA_VISIBLE_DEVICES'] = "3"
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
## file name
embedding_filename = "polyglot-en.pkl"  ## pretrained 64 dim word embedding
## Get data
yelp = Yelp.Yelp()
yelp.get_embedding(embedding_filename)
label, review = yelp.get_data("train")
train_X = yelp.make_corpus(review)
char_list = yelp.char_list(train_X)
yelp.get_OOV(char_list)

## Data -> Vector
train_X_ = yelp.Convert2Vec(train_X, "Context_Char")
train_Y_ = label

Batch_size = 32
Total_size = len(train_X)
Vector_size = 64
seq_length = [len(x) for x in train_X]
Maxseq_length = max(seq_length)