Skip to content

Commit

Permalink
Rename Train_CNN_multi.cpp to Train_cnn_multi.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
xrb92 committed Nov 27, 2015
1 parent 875b3c1 commit e0ab9b7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Train_CNN_multi.cpp → Train_cnn_multi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ int nbatches, batchsize;
map<int,map<int,int> > left_entity,right_entity;
map<int,double> left_num,right_num;

int n,n_1,n_w,method; //n£ºdimension of entity/relation, n_1: dimension of feature_vec in 1st-layer CNN, n_w: dimension of word
int n,n_1,n_w,method; //n£ºdimension of entity/relation, n_1: dimension of feature_vec in 1st-layer CNN, n_w: dimension of word
double res_triple,res_cnn,res_c_e,res_e_c,res_normal; //loss function value
double res_thread_triple[THREADS_NUM], res_thread_cnn[THREADS_NUM], res_thread_normal[THREADS_NUM]; //loss for each thread
double res_thread_c_e[THREADS_NUM], res_thread_e_c[THREADS_NUM];
Expand Down Expand Up @@ -986,23 +986,23 @@ void prepare()
FILE* f3 = fopen("../data/word2id.txt","r");
FILE* f4 = fopen("../data/entityWords.txt","r");
int x;
//build entity2ID¡¢ID2entity map
//build entity2ID¡¢ID2entity map
while (fscanf(f1,"%s%d",buf,&x)==2)
{
string st=buf;
entity2id[st]=x; //<entity,ID>
id2entity[x]=st; //<ID,entity>
entity_num++;
}
//build relation2ID¡¢ID2relation map
//build relation2ID¡¢ID2relation map
while (fscanf(f2,"%s%d",buf,&x)==2)
{
string st=buf;
relation2id[st]=x;
id2relation[x]=st;
relation_num++;
}
//build word2ID¡¢ID2word map
//build word2ID¡¢ID2word map
while (fscanf(f3,"%s%d",buf,&x)==2)
{
string st=buf;
Expand Down Expand Up @@ -1115,4 +1115,4 @@ int main(int argc,char**argv)
cout<<"method = "<<version<<endl;
prepare();
run(n,n_1,n_w,rate,margin,method);
}
}

0 comments on commit e0ab9b7

Please sign in to comment.