Skip to content

Commit dde7ff0

Browse files
committed
Fixed blifat mnist example: KasperskyLab#135
1 parent e914e5d commit dde7ff0

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

examples/mnist-learn/altai/train.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ AnnotatedNetwork train_mnist_network(
153153
if (weight_stream.is_open())
154154
knp::framework::monitoring::model::add_projection_weights_logger(
155155
weight_stream, model_executor, example_network.data_.projections_from_raster_[0],
156-
steps_per_image * images_amount_to_train);
156+
projection_weights_logging_period);
157157
else
158158
std::cout << "Couldn't open weights.csv at " << log_path << std::endl;
159159
}

examples/mnist-learn/blifat/construct_network.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ struct PopulationData
5050
enum PopIndexes
5151
{
5252
INPUT = 0,
53-
DOPAMINE = 1,
54-
OUTPUT = 2,
55-
GATE = 3
53+
OUTPUT = 1,
54+
GATE = 2
5655
};
5756

5857

@@ -188,7 +187,7 @@ AnnotatedNetwork create_example_network(int num_compound_networks)
188187

189188

190189
DeltaSynapseData TARGET_to_GATE_synapse;
191-
TARGET_to_GATE_synapse.weight_ = 10;
190+
TARGET_to_GATE_synapse.weight_ = 10.f;
192191
TARGET_to_GATE_synapse.output_type_ = knp::synapse_traits::OutputType::EXCITATORY;
193192

194193
DeltaProjection TARGET_to_GATE_projection =

examples/mnist-learn/blifat/train.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ AnnotatedNetwork train_mnist_network(
168168
if (weight_stream.is_open())
169169
knp::framework::monitoring::model::add_projection_weights_logger(
170170
weight_stream, model_executor, example_network.data_.projections_from_raster_[0],
171-
20000); // projection_weights_logging_period);
171+
projection_weights_logging_period);
172172
else
173173
std::cout << "Couldn't open weights.csv at " << log_path << std::endl;
174174
}

0 commit comments

Comments
 (0)