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

65 separate task specific analysis #67

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
417 changes: 417 additions & 0 deletions retinal_rl/analysis/channel_analysis.py

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions retinal_rl/analysis/default.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from retinal_rl.analysis.plot import (
FigureLogger,
plot_brain_and_optimizers,
plot_receptive_field_sizes,
)
from retinal_rl.models.brain import Brain
from retinal_rl.models.objective import ContextT, Objective
from retinal_rl.util import FloatArray

INIT_DIR = "initialization_analysis"

def initialization_plots(
log: FigureLogger,
brain: Brain,
objective: Objective[ContextT],
input_shape: tuple[int, ...],
rf_result: dict[str, FloatArray],
):
log.save_summary(brain)

# TODO: This is a bit of a hack, we should refactor this to get the relevant information out of cnn_stats
rf_sizes_fig = plot_receptive_field_sizes(input_shape, rf_result)
log.log_figure(
rf_sizes_fig,
INIT_DIR,
"receptive_field_sizes",
0,
False,
)

graph_fig = plot_brain_and_optimizers(brain, objective)
log.log_figure(
graph_fig,
INIT_DIR,
"brain_graph",
0,
False,
)
Loading
Loading