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

Fix material matching plot (try plotting ground truth and see if right material comes out) #19

Conversation

gomezzz
Copy link
Collaborator

@gomezzz gomezzz commented Aug 24, 2021

Description

First merge #15

  • Added material grid plot
  • Small fix in find_closest_material
  • Cleaned up some imports
  • Added plot to training NB
  • Added automatic baseline detection in eps per point plot and fixed WL bug

How Has This Been Tested?

  • With training notebook
  • Ran tests

Plots look like this

image

image

- Small fix in find_closest_material
- Cleaned up some imports
- Added plot to training NB
…und-truth-and-see-if-right-material-comes-out)
Copy link
Collaborator

@htoftevaag htoftevaag left a comment

Choose a reason for hiding this comment

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

Looks good!


class LayerBuilder:
def __init__(self, run_cfg) -> None:
"""Initializes the builder
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"""Initializes the builder
"""Initializes the builder.

"""Initializes the builder

Args:
run_cfg (DotMap): Run configuration
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
run_cfg (DotMap): Run configuration
run_cfg (DotMap): Run configuration.

self.material_collection = MaterialCollection(self.run_cfg.target_frequencies)

def _setup_grid_and_materials(self,):
"""Utility function to setup essentials
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"""Utility function to setup essentials
"""Utility function to setup essentials.

nidn/plots/plot_material_grid.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@htoftevaag htoftevaag left a comment

Choose a reason for hiding this comment

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

But fix the comment first!

Co-authored-by: Håvard Hem Toftevaag <70584234+htoftevaag@users.noreply.github.com>
@gomezzz gomezzz requested a review from htoftevaag August 25, 2021 08:40
@htoftevaag htoftevaag merged commit 2e1feb3 into main Aug 25, 2021
@htoftevaag htoftevaag deleted the Fix-material-matching-plot-(try-plotting-ground-truth-and-see-if-right-material-comes-out) branch August 25, 2021 08:52
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