Skip to content

Feature Request: Improve layer_map Readability #104

Description

@izpyon

Description

While performing FG reconstruction, I encountered an issue that should be addressed to improve usability and clarity in the codebase:

Ambiguity in layer_map regarding reference_net

  • The current layer_map function does not explicitly indicate the norm1 and norm2 layers for reference_net, making it harder to understand at a glance.
  • Although these mappings can be found in the source code, explicitly listing them in layer_map will improve readability.
  • These layers are used for FG reconstruction.

Proposed Changes

Improve layer_map readability by explicitly listing norm1 and norm2 for reference_net

Modify the reference_net entry in layer_map:

'reference_net': {
    'conv1': 'features[0]',
    'relu1': 'features[1]',
    'norm1': 'features[3]',  # Explicitly added
    'conv2': 'features[4]',
    'relu2': 'features[5]',
    'norm2': 'features[7]',  # Explicitly added
    'conv3': 'features[8]',
    'relu3': 'features[9]',
    'conv4': 'features[10]',
    'relu4': 'features[11]',
    'conv5': 'features[12]',
    'relu5': 'features[13]',
    'fc6':   'classifier[1]',
    'relu6': 'classifier[2]',
    'fc7':   'classifier[4]',
    'relu7': 'classifier[5]',
    'fc8':   'classifier[6]',
}

Expected Benefits

  • The layer_map will be more intuitive, reducing confusion when working with reference_net, especially for new contributors.

Would appreciate any feedback on this!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions