| | |
| | | char *activation_s = option_find_str(options, "activation", "logistic"); |
| | | ACTIVATION activation = get_activation(activation_s); |
| | | int batch_normalize = option_find_int_quiet(options, "batch_normalize", 0); |
| | | int logistic = option_find_int_quiet(options, "logistic", 0); |
| | | |
| | | layer l = make_rnn_layer(params.batch, params.inputs, hidden, output, params.time_steps, activation, batch_normalize); |
| | | layer l = make_rnn_layer(params.batch, params.inputs, hidden, output, params.time_steps, activation, batch_normalize, logistic); |
| | | |
| | | l.shortcut = option_find_int_quiet(options, "shortcut", 0); |
| | | |
| | | return l; |
| | | } |
| | |
| | | { |
| | | fprintf(stderr, "Loading weights from %s...", filename); |
| | | fflush(stdout); |
| | | FILE *fp = fopen(filename, "r"); |
| | | FILE *fp = fopen(filename, "rb"); |
| | | if(!fp) file_error(filename); |
| | | |
| | | int major; |