- update poet
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@842 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+132
@@ -0,0 +1,132 @@
|
|||||||
|
{
|
||||||
|
"stack" :
|
||||||
|
{
|
||||||
|
"layers" :
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id" : 0,
|
||||||
|
"name" : "Layer",
|
||||||
|
"numContext" : 256,
|
||||||
|
"numHidden" : 256,
|
||||||
|
"numVisibleX" : 37,
|
||||||
|
"numVisibleY" : 2,
|
||||||
|
"rbm" :
|
||||||
|
{
|
||||||
|
"params" :
|
||||||
|
{
|
||||||
|
"doRaoBlackwell" : 1,
|
||||||
|
"doSampleBatch" : 0,
|
||||||
|
"gibbsDoSampleHidden" : 0,
|
||||||
|
"gibbsDoSampleVisible" : 0,
|
||||||
|
"learningRate" : 0.10000000000000001,
|
||||||
|
"miniBatchSize" : 1000,
|
||||||
|
"momentum" : 0.5,
|
||||||
|
"numEpochs" : 1000,
|
||||||
|
"numGibbs" : 1,
|
||||||
|
"weightDecay" : 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 1,
|
||||||
|
"name" : "Layer",
|
||||||
|
"numContext" : 256,
|
||||||
|
"numHidden" : 256,
|
||||||
|
"numVisibleX" : 37,
|
||||||
|
"numVisibleY" : 2,
|
||||||
|
"rbm" :
|
||||||
|
{
|
||||||
|
"params" :
|
||||||
|
{
|
||||||
|
"doRaoBlackwell" : 1,
|
||||||
|
"doSampleBatch" : 0,
|
||||||
|
"gibbsDoSampleHidden" : 0,
|
||||||
|
"gibbsDoSampleVisible" : 0,
|
||||||
|
"learningRate" : 0.10000000000000001,
|
||||||
|
"miniBatchSize" : 1000,
|
||||||
|
"momentum" : 0.5,
|
||||||
|
"numEpochs" : 1000,
|
||||||
|
"numGibbs" : 1,
|
||||||
|
"weightDecay" : 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 2,
|
||||||
|
"name" : "Layer",
|
||||||
|
"numContext" : 256,
|
||||||
|
"numHidden" : 256,
|
||||||
|
"numVisibleX" : 37,
|
||||||
|
"numVisibleY" : 2,
|
||||||
|
"rbm" :
|
||||||
|
{
|
||||||
|
"params" :
|
||||||
|
{
|
||||||
|
"doRaoBlackwell" : 1,
|
||||||
|
"doSampleBatch" : 0,
|
||||||
|
"gibbsDoSampleHidden" : 0,
|
||||||
|
"gibbsDoSampleVisible" : 0,
|
||||||
|
"learningRate" : 0.10000000000000001,
|
||||||
|
"miniBatchSize" : 1000,
|
||||||
|
"momentum" : 0.5,
|
||||||
|
"numEpochs" : 1000,
|
||||||
|
"numGibbs" : 1,
|
||||||
|
"weightDecay" : 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 3,
|
||||||
|
"name" : "Layer",
|
||||||
|
"numContext" : 256,
|
||||||
|
"numHidden" : 256,
|
||||||
|
"numVisibleX" : 37,
|
||||||
|
"numVisibleY" : 2,
|
||||||
|
"rbm" :
|
||||||
|
{
|
||||||
|
"params" :
|
||||||
|
{
|
||||||
|
"doRaoBlackwell" : 1,
|
||||||
|
"doSampleBatch" : 0,
|
||||||
|
"gibbsDoSampleHidden" : 0,
|
||||||
|
"gibbsDoSampleVisible" : 0,
|
||||||
|
"learningRate" : 0.10000000000000001,
|
||||||
|
"miniBatchSize" : 1000,
|
||||||
|
"momentum" : 0.5,
|
||||||
|
"numEpochs" : 1000,
|
||||||
|
"numGibbs" : 1,
|
||||||
|
"weightDecay" : 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 4,
|
||||||
|
"name" : "Layer",
|
||||||
|
"numContext" : 256,
|
||||||
|
"numHidden" : 256,
|
||||||
|
"numVisibleX" : 37,
|
||||||
|
"numVisibleY" : 2,
|
||||||
|
"rbm" :
|
||||||
|
{
|
||||||
|
"params" :
|
||||||
|
{
|
||||||
|
"doRaoBlackwell" : 1,
|
||||||
|
"doSampleBatch" : 0,
|
||||||
|
"gibbsDoSampleHidden" : 0,
|
||||||
|
"gibbsDoSampleVisible" : 0,
|
||||||
|
"learningRate" : 0.10000000000000001,
|
||||||
|
"miniBatchSize" : 1000,
|
||||||
|
"momentum" : 0.5,
|
||||||
|
"numEpochs" : 1000,
|
||||||
|
"numGibbs" : 1,
|
||||||
|
"weightDecay" : 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name" : "poet_2v_5s",
|
||||||
|
"numContext" : 256,
|
||||||
|
"type" : 2,
|
||||||
|
"type_string" : "Rnn"
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-3
@@ -36,7 +36,7 @@ class RbmListener : public Rbm::IListener
|
|||||||
|
|
||||||
|
|
||||||
#define CREATE_TRAINING 0
|
#define CREATE_TRAINING 0
|
||||||
#define DO_TRAINING 1
|
#define DO_TRAINING 0
|
||||||
#define DO_FORWARD 1
|
#define DO_FORWARD 1
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
@@ -91,7 +91,7 @@ int main()
|
|||||||
arma::mat next;
|
arma::mat next;
|
||||||
std::string curr_str;
|
std::string curr_str;
|
||||||
std::string next_str;
|
std::string next_str;
|
||||||
for (int i=0; i < t_vc.n_rows; i++)
|
for (int i=0; i < t_vc.n_rows-50; i++)
|
||||||
{
|
{
|
||||||
curr = stack->to_curr(t_vc.row(i));
|
curr = stack->to_curr(t_vc.row(i));
|
||||||
curr_str.append(1,RnnTextHelper::idx2ch(curr.index_max()));
|
curr_str.append(1,RnnTextHelper::idx2ch(curr.index_max()));
|
||||||
@@ -102,7 +102,7 @@ int main()
|
|||||||
cout << "Curr: " << curr_str << std::endl;
|
cout << "Curr: " << curr_str << std::endl;
|
||||||
cout << "Next: " << next_str << std::endl;
|
cout << "Next: " << next_str << std::endl;
|
||||||
|
|
||||||
for (int i=0; i < 430; i++)
|
for (int i=0; i < 120; i++)
|
||||||
{
|
{
|
||||||
curr = next;
|
curr = next;
|
||||||
curr_str.append(1,RnnTextHelper::idx2ch(curr.index_max()));
|
curr_str.append(1,RnnTextHelper::idx2ch(curr.index_max()));
|
||||||
|
|||||||
Reference in New Issue
Block a user