tlearn 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/tlearn/tlearn_ext.c +3 -3
- data/lib/tlearn/run_tlearn.rb +2 -0
- metadata +2 -2
data/ext/tlearn/tlearn_ext.c
CHANGED
@@ -418,7 +418,7 @@ static VALUE tlearn_train(VALUE self, VALUE config) {
|
|
418
418
|
VALUE file_root_value = rb_hash_aref(config, ID2SYM(rb_intern("file_root")));
|
419
419
|
char *file_root = StringValueCStr(file_root_value);
|
420
420
|
|
421
|
-
float current_weights_output[
|
421
|
+
float current_weights_output[255];
|
422
422
|
|
423
423
|
int result = run_training(nsweeps, file_root, current_weights_output);
|
424
424
|
|
@@ -437,7 +437,7 @@ static VALUE tlearn_fitness(VALUE self, VALUE config) {
|
|
437
437
|
char *file_root = StringValueCStr(file_root_value);
|
438
438
|
float *result_weights;
|
439
439
|
|
440
|
-
float current_weights_output[
|
440
|
+
float current_weights_output[255];
|
441
441
|
|
442
442
|
int failure = run_fitness(nsweeps, file_root, current_weights_output);
|
443
443
|
|
@@ -446,7 +446,7 @@ static VALUE tlearn_fitness(VALUE self, VALUE config) {
|
|
446
446
|
if(failure == 0){
|
447
447
|
float weight;
|
448
448
|
int result_index;
|
449
|
-
for(result_index = 0; result_index <
|
449
|
+
for(result_index = 0; result_index < no; result_index++){
|
450
450
|
weight = current_weights_output[result_index];
|
451
451
|
rb_ary_store(ruby_array, result_index, rb_float_new(weight));
|
452
452
|
}
|
data/lib/tlearn/run_tlearn.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tlearn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|