mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
more rnn stuff
This commit is contained in:
parent
c7c1e0e7b7
commit
baec87e7ac
@ -48,8 +48,6 @@ float_pair get_rnn_data(unsigned char *text, int characters, int len, int batch,
|
|||||||
void train_char_rnn(char *cfgfile, char *weightfile, char *filename)
|
void train_char_rnn(char *cfgfile, char *weightfile, char *filename)
|
||||||
{
|
{
|
||||||
FILE *fp = fopen(filename, "rb");
|
FILE *fp = fopen(filename, "rb");
|
||||||
//FILE *fp = fopen("data/ab.txt", "r");
|
|
||||||
//FILE *fp = fopen("data/grrm/asoiaf.txt", "r");
|
|
||||||
|
|
||||||
fseek(fp, 0, SEEK_END);
|
fseek(fp, 0, SEEK_END);
|
||||||
size_t size = ftell(fp);
|
size_t size = ftell(fp);
|
||||||
|
@ -18,10 +18,12 @@ void increment_layer(layer *l, int steps)
|
|||||||
l->x += num;
|
l->x += num;
|
||||||
l->x_norm += num;
|
l->x_norm += num;
|
||||||
|
|
||||||
|
#ifdef GPU
|
||||||
l->output_gpu += num;
|
l->output_gpu += num;
|
||||||
l->delta_gpu += num;
|
l->delta_gpu += num;
|
||||||
l->x_gpu += num;
|
l->x_gpu += num;
|
||||||
l->x_norm_gpu += num;
|
l->x_norm_gpu += num;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
layer make_rnn_layer(int batch, int inputs, int hidden, int outputs, int steps, ACTIVATION activation, int batch_normalize, int log)
|
layer make_rnn_layer(int batch, int inputs, int hidden, int outputs, int steps, ACTIVATION activation, int batch_normalize, int log)
|
||||||
|
Loading…
Reference in New Issue
Block a user