Pull request for issues #123 #121 #64#135
Closed
DavidIkov wants to merge 43 commits intoKasperskyLab:masterfrom
Closed
Pull request for issues #123 #121 #64#135DavidIkov wants to merge 43 commits intoKasperskyLab:masterfrom
DavidIkov wants to merge 43 commits intoKasperskyLab:masterfrom
Conversation
This was
linked to
issues
Dec 26, 2025
Closed
Closed
artiomn
requested changes
Jan 15, 2026
Comment on lines
+20
to
+21
| add_subdirectory(blifat) | ||
| add_subdirectory(altai) |
Contributor
There was a problem hiding this comment.
Что-то здесь не то. У сеток различаются нейроны, однако топология почти дублируется.
Зачем столько копипаста?
Comment on lines
+28
to
+29
| add_executable(mnist_learn_altai_example main.cpp construct_network.cpp train.cpp inference.cpp time_string.cpp) | ||
| target_link_libraries(mnist_learn_altai_example PRIVATE KNP::BaseFramework::Core ${Boost_LIBRARIES}) |
Contributor
There was a problem hiding this comment.
Вероятно, надо сделать один пример, в котором опциями будет выбираться сеть.
Для построения лучше использовать шаблонные функции.
И передавать им тип нейрона.
|
|
||
| enum PopIndexes | ||
| { | ||
| L, |
Contributor
There was a problem hiding this comment.
Комментарий, что ещё за "L" (а лучше поменять название)?
Comment on lines
+83
to
+95
| l_neuron.d_h_ = -0.1765261f * 1000; | ||
|
|
||
| // stability_resource_change_ratio | ||
| l_neuron.stability_change_parameter_ = 0.0497573 / 1000; | ||
|
|
||
| // silent synapses | ||
| l_neuron.resource_drain_coefficient_ = 27; | ||
|
|
||
| // chartime * hebbian_plasticity_chartime_ratio | ||
| // l_neuron.dopamine_plasticity_time_ = 3 * 2.72f; | ||
|
|
||
| // threshold_excess_weight_dependent | ||
| l_neuron.synapse_sum_threshold_coefficient_ = 0.217654; |
Contributor
There was a problem hiding this comment.
Немного бы рассказать о том, что это за магические числа, откуда взялись, почему такие, - это пример для пользователя.
Comment on lines
+97
to
+103
| struct PopulationRole | ||
| { | ||
| PopulationData<ResourceNeuron> pd_; | ||
| bool for_inference_; | ||
| bool output_; | ||
| std::string name_; | ||
| }; |
Contributor
There was a problem hiding this comment.
Не стоит ли отметить это для фреймворка?
Comment on lines
+110
to
+111
|
|
||
|
|
| #include <vector> | ||
|
|
||
| #include "impl/populations/interface.h" | ||
|
|
| future_messages.erase(out_iter); | ||
| } | ||
| } | ||
|
|
| impl::calculate_projection_multithreaded_interface( | ||
| projection, message_in_data, future_messages, step_n, part_start, part_size, mutex); | ||
| } | ||
|
|
Comment on lines
+143
to
158
| auto call_calculate_post_input_state = [](T &pop_ref, | ||
| knp::core::messaging::SpikeMessage &message_ref, | ||
| size_t start, size_t end, std::mutex &mutex_ref) | ||
| { | ||
| uint64_t part_end = std::min<uint64_t>(start + end, pop_ref.size()); | ||
| knp::core::messaging::SpikeMessage buffer_message; | ||
| knp::backends::cpu::populations::calculate_post_impact_population_state( | ||
| pop_ref, buffer_message, start, part_end); | ||
| const std::lock_guard lock(mutex_ref); | ||
| message_ref.neuron_indexes_.reserve( | ||
| message_ref.neuron_indexes_.size() + buffer_message.neuron_indexes_.size()); | ||
| message_ref.neuron_indexes_.insert( | ||
| message_ref.neuron_indexes_.end(), buffer_message.neuron_indexes_.begin(), | ||
| buffer_message.neuron_indexes_.end()); | ||
| }; | ||
| calc_pool_->post( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.