Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
382 commits
Select commit Hold shift + click to select a range
e6c24c2
Extend Method table for new transparency methods.
KonstantinWilleke Nov 2, 2021
57896b5
Adds thresholded FEV table.
KonstantinWilleke Nov 2, 2021
319870f
Add gaussloss in mei.targets.py
KonstantinWilleke Nov 2, 2021
56bf433
Add utility function of augmented readout.
KonstantinWilleke Nov 3, 2021
d681308
Add reconstruction submodule to tables module.
KonstantinWilleke Nov 3, 2021
5a2c346
fix bugs in get_output_selected_model in Reconstruction Table.
KonstantinWilleke Nov 4, 2021
9accf98
Add mei transparency initial methods for transparency and ring-MEIs.
KonstantinWilleke Nov 8, 2021
f60e84e
simplify and rename cosine mask function.
KonstantinWilleke Nov 17, 2021
4e409c8
add new modules to test new main of neuralpredictors
KonstantinWilleke Nov 18, 2021
9abafd2
make fullgauss2d work.
KonstantinWilleke Nov 18, 2021
ea5f4ed
adding generalized CL dataloader.
KonstantinWilleke Dec 10, 2021
56d8980
Adding AllGray to mei.initial.py
KonstantinWilleke Dec 10, 2021
6333985
Adding new collapsing channel mei for shape optimization.
KonstantinWilleke Dec 10, 2021
5b9f5dc
simplify readout imports in readout module.
KonstantinWilleke Dec 10, 2021
2908130
make model predictions with no_grad()
KonstantinWilleke Dec 10, 2021
a4fe438
Merge pull request #57 from KonstantinWilleke/neuralpred_main_tests
KonstantinWilleke Dec 10, 2021
5127957
Add transfer_core_selfattention_readout model function for closed loo…
KonstantinWilleke Dec 13, 2021
91ca44f
Merge pull request #58 from KonstantinWilleke/neuralpred_main_tests
KonstantinWilleke Dec 13, 2021
a283273
add option to SelfAtt readout to not use position_embedding.
KonstantinWilleke Dec 14, 2021
8fb19a8
add position_encoding kwarg to all selfattention model functions.
KonstantinWilleke Dec 14, 2021
a7bf624
Add previous_image to monkey static loader.
KonstantinWilleke Dec 16, 2021
e28f218
Add final_batch_norm arg to SE2d core.
KonstantinWilleke Dec 16, 2021
1e18238
Add readout for MultiHeadAttention
KonstantinWilleke Dec 16, 2021
10e6e35
add model_fn for multihead attention.
KonstantinWilleke Dec 16, 2021
223c08a
add final_batch_norm kwargs to attentionReadout model_fn kwargs.
KonstantinWilleke Dec 16, 2021
f46d0c5
Add documentation of explainable variance in utility.measures.
KonstantinWilleke Dec 20, 2021
acc381a
Add avg firing table.
KonstantinWilleke Dec 21, 2021
99b9606
account for DB changes.
KonstantinWilleke Jan 5, 2022
9817c5d
Add secure=True arg in dj store config.
KonstantinWilleke Jan 6, 2022
3a710a2
Merge branch 'neuralpred_main_tests' into selfattention_readout
KonstantinWilleke Jan 6, 2022
93f0634
Merge pull request #59 from KonstantinWilleke/selfattention_readout
KonstantinWilleke Jan 6, 2022
ffcb37e
extend v4 dataloader to include trial_id
KonstantinWilleke Jan 10, 2022
dba89a7
Add RandomNormalSelectChannels in mei.initial.
KonstantinWilleke Jan 10, 2022
d6d3955
Add custom_task_core_multihead_attention in ptrmodels.
KonstantinWilleke Jan 10, 2022
8c2d91f
Add pings in scoring tables.
KonstantinWilleke Jan 10, 2022
eb24f11
Add connection.ping() within an epoch to avoid database DCs
KonstantinWilleke Jan 10, 2022
75fcfe4
Extend model_predictions_repeats to deal with multichannel images.
KonstantinWilleke Jan 10, 2022
342d130
Merge branch 'neuralpred_main_tests' of github.com:KonstantinWilleke/…
KonstantinWilleke Jan 10, 2022
7f376fc
readd transfer_core_selfattention_readout to model functions.
KonstantinWilleke Jan 10, 2022
e67f9f0
Add transfer_core_multihead_attention_readout model fn.
KonstantinWilleke Jan 11, 2022
9f80b4e
Merge pull request #60 from KonstantinWilleke/selfattention_readout
KonstantinWilleke Jan 11, 2022
4774203
Make monkey dataloader work with trial id, without specifying previou…
KonstantinWilleke Jan 11, 2022
e2c6eda
Merge branch 'neuralpred_main_tests' of github.com:KonstantinWilleke/…
KonstantinWilleke Jan 11, 2022
a77a1e2
bugfix for having prev images only without trial id.
KonstantinWilleke Jan 11, 2022
1efe66a
Extend Pretrained Models to aceept 2-channel inputs.
KonstantinWilleke Jan 15, 2022
9de2c79
apply black.
KonstantinWilleke Feb 16, 2022
0d07a11
Add MultipleSharedMultiHeadAttention2d.
KonstantinWilleke Feb 16, 2022
fccf076
add gamma hidden and stride to se_core_ models.
KonstantinWilleke Feb 16, 2022
71dc6fa
make calculation of test correlation optional.
KonstantinWilleke Feb 16, 2022
e19cce2
Enable ptrmodels to use stacking arguments in the multihead attention…
KonstantinWilleke Feb 16, 2022
fcf1467
add imports of ptr models in init.
KonstantinWilleke Feb 24, 2022
18a3d91
Add hidden sparsity regularizer to SE2D core.
KonstantinWilleke Feb 24, 2022
c3d4d2b
Add new StaticImage Stimulus tables.
KonstantinWilleke Mar 5, 2022
ab04ba8
Add experiment helper module in utility.
KonstantinWilleke Mar 5, 2022
232bf6f
Add masking and image processing helpers in experiment module.
KonstantinWilleke Mar 5, 2022
bc1e0fe
extend shift_image_based_on_masks in experiment helpers.
KonstantinWilleke Mar 7, 2022
933e645
separate image paths for closed loop dataloader function.
KonstantinWilleke Apr 6, 2022
442dd37
Add closed loop stimuli table.
KonstantinWilleke Apr 6, 2022
5a517b3
Add expanded CL stimuli tables.
KonstantinWilleke Apr 6, 2022
76d4e82
add repeat_channel_dim kwarg to model prediction utility.
KonstantinWilleke May 4, 2022
2cb8321
add repeat_channel_dim kwarg to Encoder.
KonstantinWilleke May 4, 2022
e90a058
add se_core_shared_multihead_attention model function.
KonstantinWilleke May 4, 2022
5f6729d
add transfere_core_shared_multihead_attention model function.
KonstantinWilleke May 31, 2022
426f50b
Add output_attn_weights to Encoder kwargs.
KonstantinWilleke May 31, 2022
188513c
Merge pull request #43 from KonstantinWilleke/verification_experiment
KonstantinWilleke May 31, 2022
ca98451
Merge pull request #1 from sinzlab/inception_loops
elena-off Jun 1, 2022
90672eb
added monkey_static_extenders for more previous images
elena-off Jun 14, 2022
849f8c8
added functionality to input several previous images
elena-off Aug 5, 2022
c8314de
added functionality to input previous responses, but problem with num…
elena-off Aug 8, 2022
965ef6a
started adding functionality to input previous responses into readout…
elena-off Aug 22, 2022
59a571d
added functionality to input responses from other neurons into readout
elena-off Aug 24, 2022
7625458
worked on functionality to input previous responses from neurons
elena-off Aug 26, 2022
8f881e3
add task_core_factorized_readout model.
KonstantinWilleke Sep 5, 2022
f8fea89
add kwargs in init of MultipleSelfAttention2d.
KonstantinWilleke Sep 5, 2022
f5a8c8c
add latest dependencies of nnvision.
KonstantinWilleke Sep 5, 2022
e834fe9
simplify Dockerfile.
KonstantinWilleke Sep 5, 2022
920bc88
Merge pull request #44 from KonstantinWilleke/verification_experiment
KonstantinWilleke Sep 5, 2022
63f1398
Add V1 SOTA notebook.
KonstantinWilleke Sep 5, 2022
1e9c2dc
Merge pull request #45 from KonstantinWilleke/verification_experiment
KonstantinWilleke Sep 5, 2022
731d2c1
can now input other responses, which means the same as context respon…
elena-off Sep 27, 2022
0e9989f
added model_predictions_shuffled, which enables test answers to be sh…
elena-off Oct 3, 2022
7fff777
added regularizer to modulators
elena-off Oct 30, 2022
12a7e53
fix bug with background images in transparency mask.
KonstantinWilleke Nov 2, 2022
9d394bb
Merge branch 'inception_loops' of https://github.com/sinzlab/nnvision…
KonstantinWilleke Nov 2, 2022
f7ed0c0
fix background images in transparency mei ops
KonstantinWilleke Nov 2, 2022
fe39a15
added monkey_static_loader_combined, with which you can restructure t…
elena-off Dec 3, 2022
67c21af
added n_neurons (how many neurons are in which sessions) to improve c…
elena-off Dec 10, 2022
461a921
add adamw to nnvision trainer.
KonstantinWilleke Dec 11, 2022
6f5f297
Merge branch 'inception_loops_elena' of https://github.com/elena-off/…
KonstantinWilleke Dec 11, 2022
a8d6989
expand trainer to deal with combined sessions
KonstantinWilleke Dec 12, 2022
de351cc
fix bugs in encoders for attention weights forward kwargs
KonstantinWilleke Dec 15, 2022
139a918
apply black.
KonstantinWilleke Dec 15, 2022
c5cbcb7
Merge branch 'inception_loops' into verification_experiment
KonstantinWilleke Dec 15, 2022
1838e41
Merge pull request #48 from KonstantinWilleke/verification_experiment
KonstantinWilleke Dec 15, 2022
367b489
make eexceeption broader when looking for datajoint or tables.
KonstantinWilleke Dec 15, 2022
b8c7908
Merge branch 'verification_experiment' of github.com:KonstantinWillek…
KonstantinWilleke Dec 15, 2022
051336f
Merge pull request #49 from KonstantinWilleke/verification_experiment
KonstantinWilleke Dec 15, 2022
58e4e7f
make import of ptrmodels optional.
KonstantinWilleke Jan 8, 2023
21a1e5c
remove dj dependency in models.py
KonstantinWilleke Jan 8, 2023
1f3d895
fix bug for all models when dataloader has more than 2 kwargs.
KonstantinWilleke Jan 8, 2023
bdd5367
add transparency_weight to custom MEIMethod.
KonstantinWilleke Jan 8, 2023
27f9ee7
Make Recording table work for the combined dataloader.
KonstantinWilleke Jan 8, 2023
1a9f3ca
Add batch insert of unit keys in ScoringTables.
KonstantinWilleke Jan 8, 2023
94572f5
Add no_grad() in all model_predictions in utility.measures
KonstantinWilleke Jan 8, 2023
dbd5178
run black.
KonstantinWilleke Jan 8, 2023
b32c7c9
Merge branch 'inception_loops' into elena_combined
KonstantinWilleke Jan 8, 2023
debe7dd
Merge pull request #52 from KonstantinWilleke/elena_combined
KonstantinWilleke Jan 8, 2023
465f579
Extend setup.py
KonstantinWilleke Jan 8, 2023
015bfec
Merge branch 'elena_combined' of github.com:KonstantinWilleke/nnvisio…
KonstantinWilleke Jan 8, 2023
cc408db
Merge pull request #53 from KonstantinWilleke/elena_combined
KonstantinWilleke Jan 8, 2023
897489a
fix bug in models.readouts from merging conflicts.
KonstantinWilleke Jan 8, 2023
9668be9
Add mei to setup.py
KonstantinWilleke Jan 8, 2023
274c655
Merge pull request #54 from KonstantinWilleke/elena_combined
KonstantinWilleke Jan 8, 2023
40742b6
Extend nnvision setup to allow pip installing without docker
KonstantinWilleke Jan 8, 2023
65c3153
Make SOTA model available.
KonstantinWilleke Jan 8, 2023
f09fb86
remove ax dependencies.
KonstantinWilleke Jan 8, 2023
1b0bc32
fix bug in relative path when loading models.
KonstantinWilleke Jan 8, 2023
3a603b0
Merge pull request #55 from KonstantinWilleke/elena_combined
KonstantinWilleke Jan 8, 2023
3b92f83
fix another bug for relative state dict paths.
KonstantinWilleke Jan 8, 2023
c28d576
Merge pull request #56 from KonstantinWilleke/elena_combined
KonstantinWilleke Jan 8, 2023
45cf314
remove .tar and .pt from gitignore.
KonstantinWilleke Jan 8, 2023
3daed33
move model weights
KonstantinWilleke Jan 8, 2023
6523c44
remove gitignore.
KonstantinWilleke Jan 8, 2023
27dfe05
add manifest.in
KonstantinWilleke Jan 8, 2023
9738c29
Merge pull request #57 from KonstantinWilleke/elena_combined
KonstantinWilleke Jan 8, 2023
f4e74b9
re-add gitignore.
KonstantinWilleke Jan 9, 2023
b743056
move model weights to designated folder.
KonstantinWilleke Jan 9, 2023
af3f96a
Extend setup to include model weights.
KonstantinWilleke Jan 9, 2023
6049c2c
remove superfluous manifest.in file
KonstantinWilleke Jan 9, 2023
78a0821
extend package data in setup.py
KonstantinWilleke Jan 9, 2023
30d8d6c
extend package data again in setup.py
KonstantinWilleke Jan 9, 2023
d9e475d
change path of data in model loading scrips.
KonstantinWilleke Jan 9, 2023
4f9f561
remove include_package_data=True from setup.py
KonstantinWilleke Jan 9, 2023
da18b27
re-add manifest.in
KonstantinWilleke Jan 9, 2023
df6b1dd
Merge pull request #58 from KonstantinWilleke/elena_combined
KonstantinWilleke Jan 9, 2023
7f29ac2
add interface table for combined session models.
KonstantinWilleke Jan 17, 2023
e3e4a5f
Merge pull request #59 from KonstantinWilleke/elena_combined
KonstantinWilleke Jan 17, 2023
7a55efe
fix bug in RecordingInterface table.
KonstantinWilleke Jan 18, 2023
9e55190
Add SharedSlotAttention2d readout.
KonstantinWilleke Jan 18, 2023
0bb63d9
Add se_core_slot_attention model function.
KonstantinWilleke Jan 18, 2023
e7abcd0
edit singularity and slurm_job.py
KonstantinWilleke Jan 18, 2023
c6eded7
remove buggy RecordingInterface table.
KonstantinWilleke Jan 18, 2023
ab60d25
Merge pull request #60 from KonstantinWilleke/elena_combined
KonstantinWilleke Jan 18, 2023
79bd3e9
make ptr model import optional.
KonstantinWilleke Jan 19, 2023
24ca0bd
add new home folder in singularity run
KonstantinWilleke Jan 21, 2023
6d700d9
Add fullSlotAttention model
KonstantinWilleke Jan 21, 2023
e12d07c
Add FullSlotAttention2d for different ways of dealing with slot atten…
KonstantinWilleke Jan 21, 2023
260dc4b
remove debug print statements.
KonstantinWilleke Jan 22, 2023
8440625
move model weights to dedicated folder.
KonstantinWilleke Jan 30, 2023
268cce7
add RecordingInterface table.
KonstantinWilleke Jan 30, 2023
e61ecf8
add pretrained weights for ensemble members 2-4.
KonstantinWilleke Jan 30, 2023
0076533
extend trained model loading module with ensemble model.
KonstantinWilleke Jan 30, 2023
4388152
Merge pull request #61 from KonstantinWilleke/slot_attention
KonstantinWilleke Jan 30, 2023
faef23b
fix bug when loading pretrained ensemble model.
KonstantinWilleke Jan 30, 2023
27a02e6
Merge pull request #62 from KonstantinWilleke/slot_attention
KonstantinWilleke Jan 30, 2023
27ed2fd
extend encoder to return attention maps flexibly.
KonstantinWilleke Jan 31, 2023
3290b14
add model for GroupSlotAttention2d
KonstantinWilleke Jan 31, 2023
a7799f1
Add GroupSlotAttention2d readout.
KonstantinWilleke Jan 31, 2023
a46a6b7
Add validator ensemble model weights.
KonstantinWilleke Feb 3, 2023
a2e9f0f
Add task driven ensemble model weights.
KonstantinWilleke Feb 3, 2023
11dc9aa
Add second data driven ensemble model.
KonstantinWilleke Feb 3, 2023
07c062f
Add v4_task_driven.py module to load resnets.
KonstantinWilleke Feb 3, 2023
94599a2
Merge pull request #63 from KonstantinWilleke/slot_attention
KonstantinWilleke Feb 3, 2023
75c7df1
Add new dependencies for using pretrained robust networks.
KonstantinWilleke Feb 3, 2023
3bdb26d
Merge pull request #64 from KonstantinWilleke/slot_attention
KonstantinWilleke Feb 3, 2023
b9f2d03
Add ConvNext module.
KonstantinWilleke Feb 21, 2023
fc00714
use latest docker image in singularity.def.
KonstantinWilleke Feb 22, 2023
bdf2a78
Add cifar and mei dataloaders for t-simCNE.
KonstantinWilleke Feb 22, 2023
9faaa44
fix output of attention weights in Encoder.
KonstantinWilleke Feb 22, 2023
74cc0aa
Add module for tsimcne models functions.
KonstantinWilleke Feb 22, 2023
61ef7bf
add transfer_core_groupslot_attention model function.
KonstantinWilleke Feb 22, 2023
3b13b8d
adding debug printouts for default schema switching.
KonstantinWilleke Feb 22, 2023
22b3b6a
Add tables for t-simCNE training.
KonstantinWilleke Feb 22, 2023
84ca055
Add t-simcne trainer functions.
KonstantinWilleke Feb 22, 2023
fbaecf2
Add multistep_trainer functions in trainers.py
KonstantinWilleke Feb 22, 2023
749a7a7
fix torch version in singularity.def
KonstantinWilleke Feb 22, 2023
a9055be
fix bug in CorNet setup.py
KonstantinWilleke Feb 22, 2023
8a0fb6f
extend setup.py
KonstantinWilleke Feb 22, 2023
c529ee8
debug setup.py
KonstantinWilleke Feb 22, 2023
05643fa
remove buggy packages from setup.py
KonstantinWilleke Feb 22, 2023
349231a
Add V1 model notebook.
KonstantinWilleke Mar 21, 2023
2fdbc52
Merge pull request #65 from KonstantinWilleke/slot_attention
KonstantinWilleke Mar 21, 2023
f659bd2
refactor RecordingInterface table.
KonstantinWilleke Mar 23, 2023
0cf5f46
fix bug for more than 2 kwargs in dataloaders.
KonstantinWilleke Mar 23, 2023
87f6ef6
add get_neuronal_responses for reconstructing from real neuronal resp…
KonstantinWilleke Mar 23, 2023
209db41
Merge pull request #66 from KonstantinWilleke/slot_attention
KonstantinWilleke Mar 23, 2023
9132574
add exception for cnexp import.
KonstantinWilleke Mar 24, 2023
b716483
Merge pull request #67 from KonstantinWilleke/slot_attention
KonstantinWilleke Mar 24, 2023
3d73383
Extend dataloader conventions to also work with deeplake dataloaders.
KonstantinWilleke Mar 31, 2023
cf52c3f
Merge pull request #68 from KonstantinWilleke/slot_attention
KonstantinWilleke Mar 31, 2023
17a5a6f
fix permute bug
katrinfranke Mar 31, 2023
e21f988
rename model weights folders.
KonstantinWilleke Apr 5, 2023
67a83b6
Add trained SOTA v1 model
KonstantinWilleke Apr 5, 2023
e60cb00
Merge pull request #69 from KonstantinWilleke/slot_attention
KonstantinWilleke Apr 12, 2023
ac9639f
[add] option to turn off final nonlinearity
MaxFBurg Sep 7, 2023
6a95321
Merge pull request #70 from MaxFBurg/model_builder
KonstantinWilleke Sep 7, 2023
8d861f0
Merge pull request #63 from sinzlab/model_builder
KonstantinWilleke Nov 22, 2023
df9f86d
singularity cluster definition for new tsimcne.
KonstantinWilleke Nov 24, 2023
fa1f03d
add transformers requirement to setup.py
KonstantinWilleke Nov 24, 2023
dc2b39b
add mei analysis script
KonstantinWilleke Nov 24, 2023
fadd95d
change order of rotation transformation in contrastive mei loader.
KonstantinWilleke Nov 24, 2023
63ea0ed
remove buggy OracleScoreCorrected table
KonstantinWilleke Nov 24, 2023
0f55afd
generalize utilities for "bools" attribute in dataloader.
KonstantinWilleke Nov 24, 2023
b0897f0
modify run.py for convnext search
KonstantinWilleke Nov 26, 2023
5085b21
Add ConvNext cores and model functions
KonstantinWilleke Nov 26, 2023
580cdbb
add convnext clipping utility
KonstantinWilleke Nov 26, 2023
b7ab3f0
update singularity image file
KonstantinWilleke Nov 26, 2023
8e58cc6
Add data driven convnext with transformer readout.
KonstantinWilleke Nov 28, 2023
2bd5ee4
update slurm runscript.
KonstantinWilleke Nov 28, 2023
61c8a73
run script convnext data driven.
KonstantinWilleke Nov 28, 2023
1748e17
color bugfixes katrin
katrinfranke Jan 2, 2024
24b158b
Merge branch 'model_builder' into color_bugfix
KonstantinWilleke Jan 2, 2024
5c5e699
fix bug in tables.main for combined bisc recordings.
KonstantinWilleke Jan 2, 2024
2e51bb3
change model_prediction function to return numpy arrays.
KonstantinWilleke Jan 2, 2024
8a28961
change np.int datatypes for combined_dataloader fn
KonstantinWilleke Jan 2, 2024
0450e7c
bugfix for colored input in ImageCache
KonstantinWilleke Jan 2, 2024
cbba018
fix typo in init.py
KonstantinWilleke Jan 4, 2024
904cd4c
Merge branch 'color_bugfix' into slot_attention
KonstantinWilleke Jan 4, 2024
7d8d7ce
Add main_interface for BISC tables.
KonstantinWilleke Jan 10, 2024
f13b41d
Add convnext finetune trainer.
KonstantinWilleke Jan 10, 2024
23f3c32
Add pretrained V1 convnext model
KonstantinWilleke Jan 10, 2024
d82b7b3
Update model loading notebook.
KonstantinWilleke Jan 10, 2024
7c3b2bb
add fine tuned color V1 model.
KonstantinWilleke Jan 17, 2024
43ff33e
add unit restrictions for neuronal response reconstructions.
KonstantinWilleke Feb 5, 2024
211b7a3
add core stacking feature to convnext core.
KonstantinWilleke Feb 5, 2024
a10aad9
add trainer that uses different custom re-initializations of code and…
KonstantinWilleke Feb 5, 2024
68e4265
simplify Recording tables for faster unit insertion.
KonstantinWilleke Feb 5, 2024
fc0e1fa
simplify unit insertion in scoring tables.
KonstantinWilleke Feb 5, 2024
a86d93d
remove debug statements.
KonstantinWilleke Feb 5, 2024
5db922e
fix bug in LFP unit table.
KonstantinWilleke May 8, 2024
4ec3b2e
speed up dj unit table insertion in templateScore
KonstantinWilleke May 8, 2024
b4d97af
Add data driven resnet model.
KonstantinWilleke May 8, 2024
23c4051
remove nnfabrik model builder dependencies.
KonstantinWilleke Aug 9, 2024
59c3d38
bugfix python 3.9 collections.abc.
KonstantinWilleke Aug 12, 2024
88170c7
remove unnecessary dependencies in setup.py
KonstantinWilleke Aug 12, 2024
142f73c
remove dependencies.
KonstantinWilleke Aug 12, 2024
8d9baf9
simplify imports.
KonstantinWilleke Aug 12, 2024
50049e9
add latest nnfabrik.
KonstantinWilleke Aug 12, 2024
f691c60
remove unnecessary dependencies
KonstantinWilleke Aug 12, 2024
b54989f
remove nnfabrik dependencies.
KonstantinWilleke Aug 12, 2024
86e2be9
remove dj dependencies in models.py
KonstantinWilleke Aug 13, 2024
a52c060
add color model.
KonstantinWilleke Aug 13, 2024
5811afb
simplify dockerfiles.
KonstantinWilleke Nov 29, 2024
26b64c8
update docker
KonstantinWilleke Nov 29, 2024
6af2667
fix numpy version
KonstantinWilleke Nov 29, 2024
e7191d7
editable isntall nnvision
KonstantinWilleke Nov 29, 2024
6f3f881
remove debug folder
KonstantinWilleke Nov 29, 2024
b6a80cd
fix numpy and HF transformers versions
KonstantinWilleke Nov 30, 2024
6f8c3e4
remove debug folder
KonstantinWilleke Nov 30, 2024
18d5fbb
update requirements.txt
KonstantinWilleke Feb 27, 2025
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
11 changes: 11 additions & 0 deletions .env_example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
JUPYTER_PASSWORD=password
DJ_HOST=134.2.168.16
DJ_USER=djuser
DJ_PASS=keyboard-stroke-face-roll
MINIO_ENDPOINT=endpoint
MINIO_ACCESS_KEY=pass
MINIO_SECRET_KEY=pass
GITHUB_TOKEN=pass
GITHUB_USER=gituser
DEV_SOURCE=gituser
BASE_IMAGE=sinzlab/pytorch:v3.8-torch1.5.0-cuda10.2-dj0.12.4
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
secrets/
*MNIST/
*egg-info/
.log
.ftpconfig
*.pyc
*.pyd
*~
.idea
.cache
.ipynb_checkpoints
*.h5
*.env
*.jpg
*.gif
.vscode
.env
.env*
*.env
.env_pipeline
.env/
logs/
*.sif
*.zip
*.json
*.log
*.csv
35 changes: 27 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
FROM sinzlab/pytorch:latest
FROM sinzlab/pytorch:v3.8-torch1.7.0-cuda11.0-dj0.12.7
ENV DEBIAN_FRONTEND=noninteractive

ADD . /src/nnfabrik
WORKDIR /src
# Install JupyterLab
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install jupyterlab
RUN pip3 install numpy==1.22.0
RUN pip3 install torch torchvision torchaudio
RUN pip3 install git+https://github.com/KonstantinWilleke/experanto.git@statshack
RUN pip3 install datajoint
RUN pip3 install opencv-python==4.8.0.74
RUN pip3 install mlflow
RUN pip3 install -U pytorch_warmup
RUN pip3 install transformers==4.28.0

RUN pip3 install -e nnfabrik
RUN pip3 install -e nnfabrik/ml-utils
RUN pip3 install -e nnfabrik/nnvision/nnvision
RUN pip3 install -e nnfabrik/mei/mei
#RUN pip3 install -e /notebooks/mousehiera

WORKDIR /notebooks
#ADD . /src/mousehiera
#RUN pip3 install -e /src/mousehiera

ADD . /notebooks
RUN pip3 install -e /notebooks

EXPOSE 8888
# By default start running jupyter notebook
WORKDIR /notebooks

#RUN git clone -b statshack https://github.com/KonstantinWilleke/experanto.git
#RUN pip3 install -e /src/experanto
ENTRYPOINT ["jupyter", "lab", "--allow-root", "--ip=0.0.0.0", "--no-browser", "--port=8888", "--NotebookApp.token='1234'", "--notebook-dir='/notebooks'"]
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include v4_multihead_attention_SOTA.pth.tar
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# nnvision
Envisioning the biological visual system with deep neural networks.

## Version 0.1
- compatible with nnfabrik and neuralpredictors post release.
58 changes: 18 additions & 40 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@
version: '2.3'
version: '12.5.1'

services:
notebook:
jupyterlab:
build: .
env_file: .env
ports:
- "5003:8888"
volumes:
- ../data:/data
#- /mnt/qb/data:/data
- /tmp:/tmp
- .:/src/nnfabrik
- ./notebooks:/notebooks
- /mnt:/mnt
- .:/src/foundation_models
environment:
- DISPLAY=$DISPLAY
- NVIDIA_VISIBLE_DEVICES=0
gpu-server_develop:
- JUPYTER_ENABLE_LAB=yes
command: >
/bin/bash -c "pip3 install torch torchvision torchaudio &&
pip3 install --upgrade jupyterlab &&
pip3 install -e /src/foundation_models &&
jupyter lab --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='1234'"

jupyter_dev:
build: .
ports:
- "8888:8888"
volumes:
- /var/lib/nova/sinz-shared:/data
- ../projects:/notebooks
env_file: .env
- /var/shared:/data
- /mnt:/mnt
- .:/notebooks
environment:
- DISPLAY=$DISPLAY
- JUPYTER_ENABLE_LAB=yes
runtime: nvidia
server_develop:
build: .
ports:
- "8888:8888"
volumes:
- ../../../var/sinz-shared:/data
- ../projects:/notebooks
env_file: .env
environment:
- DISPLAY=$DISPLAY
runtime: nvidia
gpu_server_playground:
build: .
ports:
- "8888:8888"
volumes:
- /var/lib/nova/sinz-shared:/data
env_file: .env
environment:
- DISPLAY=$DISPLAY
runtime: nvidia
shm_size: 1536g
77 changes: 77 additions & 0 deletions nnvision/analyses/mei.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
"""
this script will run the following analysis:
- load a PyTorch model
- get meis
- for mei:
- get the corresponding image and augment it:
- get 15x15 translations in height in width
- get 30 rotations for each translation
- show all 15x15x30 images to the model and get all predictions

- for each neuron, get the maximum prediction for each MEI
- order neurons by cluster_id, and show the predictions in a large matrix
"""
import numpy as np
import matplotlib.pyplot as plt
import scipy
from scipy.ndimage import rotate
from scipy.ndimage import shift
import torch

from nnvision.models.trained_models.v4_data_driven import (
v4_multihead_attention_ensemble_model,
)

model = v4_multihead_attention_ensemble_model
model.eval().cuda()

pop_key = {
"model_fn": "nnvision.models.simclr.ConvNextFC",
"model_hash": "6510835da772e26b8ceb7013718f367f",
"dataset_fn": "nnvision.datasets.mei_loaders.mei_tsmincne_loader",
"dataset_hash": "5ea066fad56931cbfca1fceb5ac3e5ca",
"trainer_fn": "nnvision.training.simclr.tsimcne_trainer",
"trainer_hash": "83f17636d44655570809589946dd296d",
"seed": 1000,
}

dl = (Dataset & pop_key).get_dataloader()
unit_ids = dl[
"validation"
].dataset.units # array of shape (n_units*n_seeds,), 11000units, with 10-20 seeds each
unique_unit_ids = np.unique(unit_ids) # array of shape (n_units,), 11000 units

# get the MEI for each unit
meis = dl[
"validation"
].dataset.meis # array of shape (n_units*n_seeds,1,100,100), 11000units, with 10-20 seeds each, 1 channel, 100x100 pixels

# create a for loop:
# for each mei, get the 15x15 translations in height and width, and the translations

response_array = []
for img in meis:
# get the 15x15 translations in height and width, and the translations
# get 15x15 translations in height in width
# get 30 rotations for each translation
# show all 15x15x30 images to the model and get all predictions
# for each neuron, get the maximum prediction for each MEI
# order neurons by cluster_id, and show the predictions in a large matrix

# get the 15x15 translations in height in width
# get 30 rotations for each translation
# show all 15x15x30 images to the model and get all predictions

augmented_imgs = []
for i in range(15):
for j in range(15):
for k in range(30):
img_rot = rotate(img.numpy(), k * 6, reshape=False)
img_shift = shift(img_rot, [i * 2, j * 2, 0])
augmented_imgs.append(img_shift)

augmented_imgs = torch.from_numpy(np.array(augmented_imgs))
with torch.no_grad():
outputs = model(augmented_imgs.cuda(), data_key="all_sessions")
outputs = outputs.cpu().numpy().max(0)
response_array.append(outputs)
Loading