Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNN & MLP linking plug-in #26

Open
wants to merge 3 commits into
base: ticlv5_14_0_0_pre0
Choose a base branch
from

Conversation

jejarosl
Copy link

@jejarosl jejarosl commented Feb 9, 2024

Added plug-in for GNN and MLP networks for trackster linking.

RecoHGCal/TICL/interface/GNNUtils.h Show resolved Hide resolved
RecoHGCal/TICL/interface/GNNUtils.h Show resolved Hide resolved
RecoHGCal/TICL/interface/GNNUtils.h Show resolved Hide resolved
for (const auto &point_i : lcs_i){
for (const auto &point_j : lcs_j){
// Calculate Euclidean distance between point_i and point_j and push it to dists
dists.push_back(std::sqrt(std::pow((point_i[0] - point_j[0]), 2) + std::pow((point_i[1] - point_j[1]), 2) + std::pow((point_i[2] - point_j[2]), 2)));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we can avoid the std::sqrt and work with everything squared would be better

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the function to output the second power of the distance, then max and min squared distances are selected. But the network is currently trained with the distance, so I still have to use sqrt for min and max distance calculation...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let's remember this then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants