facebookresearch / EGG

EGG: Emergence of lanGuage in Games
MIT License
281 stars 99 forks source link

Topsim fix #251

Closed Rotem-BZ closed 1 year ago

Rotem-BZ commented 1 year ago

The TopographicSimilarity class wasn't using the functions sender_input_distance_fn and message_distance_fn given in __init__. In addition, it couldn't work for sender_inputs of more than 1D (e.g., images), because the Spearman correlation function expects 2D input. Fixed both in the print_message method.

Description

  1. Added self.sender_input_distance_fn and self.message_distance_fn to the self.compute_topsim call inside the print_message method.
  2. Flattened sender_input to be 2D inside the print_message method.

Related Issue

https://github.com/facebookresearch/EGG/issues/250