- use RnnTextHelper

- update poet2

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@838 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2022-01-18 20:16:33 +00:00
parent cb066a5a5f
commit 022a273011
6 changed files with 213 additions and 213 deletions
+4 -4
View File
@@ -36,7 +36,7 @@ class RbmListener : public Rbm::IListener
#define CREATE_TRAINING 0
#define DO_TRAINING 0
#define DO_TRAINING 1
#define DO_FORWARD 1
int main()
@@ -52,7 +52,7 @@ int main()
}
#if CREATE_TRAINING
arma::mat batch = createTraining("moby_ch1.txt", SEQ_LENGTH);
arma::mat batch = RnnTextHelper::createTraining("moby_ch1.txt", RnnTextHelper::SEQ_LENGTH);
batch.save("poet2.training.dat", arma::arma_ascii);
return 0;
#endif
@@ -80,7 +80,7 @@ int main()
for (int i=0; i < t_vc.n_rows; i++)
{
arma::mat curr = stack->to_curr(t_vc.row(i));
char c = idx2ch(curr.index_max());
char c = RnnTextHelper::idx2ch(curr.index_max());
putchar(c);
}
printf("\n");
@@ -88,7 +88,7 @@ int main()
for (int i=0; i < t_vc.n_rows; i++)
{
arma::mat next = stack->to_next(t_vc.row(i));
char c = idx2ch(next.index_max());
char c = RnnTextHelper::idx2ch(next.index_max());
putchar(c);
}
printf("\n");