From 5935e870267ed1eae6fb8a66a4523de1234445fe Mon Sep 17 00:00:00 2001 From: Johannes Schwab PI Sjors Scheres added 22022021 Date: Sat, 21 Oct 2023 13:33:33 +0100 Subject: [PATCH] updates --- .../deformations/optimize_deformations.py | 6 +++--- .../explore_latent_space.cpython-310.pyc | Bin 6694 -> 6694 bytes .../__pycache__/visualizer.cpython-310.pyc | Bin 21753 -> 21596 bytes .../__pycache__/decoder.cpython-310.pyc | Bin 16454 -> 16478 bytes dynamight/models/decoder.py | 4 ++-- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dynamight/deformations/optimize_deformations.py b/dynamight/deformations/optimize_deformations.py index d6e80bf..361041f 100644 --- a/dynamight/deformations/optimize_deformations.py +++ b/dynamight/deformations/optimize_deformations.py @@ -928,7 +928,7 @@ def optimize_deformations( if consensus_update_rate_h1 != 0: new_pos_h1 = update_model_positions(particle_dataset, data_preprocessor, encoder_half1, decoder_half1, shifts, angles, idix_half1, consensus_update_pooled_particles, batch_size) - else: + elif epoch % 20 != 0: new_pos_h1 = decoder_half1.model_positions new_pos_h2 = update_model_positions(particle_dataset, data_preprocessor, encoder_half2, decoder_half2, shifts, angles, idix_half2, consensus_update_pooled_particles, batch_size) @@ -958,7 +958,7 @@ def optimize_deformations( if losses_half1['reconstruction_loss'] > (old_loss_half1+old2_loss_half1)/2 and consensus_update_rate_h1 != 0: nosub_ind_h1 += 1 - if nosub_ind_h1 == 1: + if nosub_ind_h1 > 1: consensus_update_rate_h1 *= consensus_update_decay if consensus_update_rate_h1 < 0.1: consensus_update_rate_h1 = 0 @@ -969,7 +969,7 @@ def optimize_deformations( # for g in dec_half2_optimizer.param_groups: # g['lr'] *= 0.9 # print('new learning rate for half 2 is', g['lr']) - if nosub_ind_h2 == 1: + if nosub_ind_h2 > 1: consensus_update_rate_h2 *= consensus_update_decay if consensus_update_rate_h2 < 0.1: consensus_update_rate_h2 = 0 diff --git a/dynamight/evaluation/__pycache__/explore_latent_space.cpython-310.pyc b/dynamight/evaluation/__pycache__/explore_latent_space.cpython-310.pyc index 96237ee7905a677bf9cd180b787a19e9156afef0..fc7360493bb27ee85c0f009220fe5a505b41ab20 100644 GIT binary patch delta 44 zcmZ2xvdn}ppO=@50SI(w8l@iA-^lk}l#yvOo7hT5M&`{M#A6v5Z*At2lwbq^1s)5Q delta 44 zcmZ2xvdn}ppO=@50SH!ImP@TS+{pJ`l#z8ao7hT5Mvl!J#A6v5qc-zNN-zQd4^9hz diff --git a/dynamight/evaluation/__pycache__/visualizer.cpython-310.pyc b/dynamight/evaluation/__pycache__/visualizer.cpython-310.pyc index 417818fa53ebbfec15fe28d730055023837aeaa6..ce1a943f52871c61e43719a425649cc65861453d 100644 GIT binary patch delta 730 zcmXAn-%Aux6vywGnPz9l*-bN3%hn`vT_%4Qy1Dox#dTja-6$`+lcfKOPbpMZyWS3d}%y{3N?zaKEx>qG%tujoiIJ9imZs+4G#6|wGn7=OoEWdb^=5zO;urv}0^a+Oph4czbTf1zawBDmCgYO^E4W=C$oZG6(!E5t>d z(MueH2jrwG;+mdi_Z%4oIEx?K%jAA~YZSE(-}nH@lLU(!Ff&N$geeLKNu4JQ5lqUN zq=pGA6pnD^bDFE9zY|7jYP0dAE)ePnwS+OkTdGSzeMj;&$1*dhJ(?|>7O(n^ ohr;>JDy5qLFS|_(Plu}^hBM)xS*fq;q>ai6nY4w)7j{9?iXeEvV+G`+r56a57;Pd5yz&_+Jc>=Ur6Ayi zgCr9VYD`MFK-7bI2Tw+cfkfkhL@p9Nc=DjpizIlEx>G{pZuYk`|DB!PWaje*{MiI! z&|uIpK4L4TK-;qy#xE8_iU8__T5y3rp*~a&Eu$Lf$AOYyswNjKzt!`4gR);T39zns z%MJwaW0TDf&+(D19ztG>5>C`1;XmDUqUJG4AFAN@D;FVdmr~athb6O>Ch1rdf%|HHE~y%r!1^j9 zCVoWT65_`vPV`V7L5cjN-Xly9rU}bv?D!~F z@!HHR;kS+k&|#tXT(MoS^FA_)I>?1g(18~8AcBzKRzj=RgK>3yY!3AA+HIPNWh z_ZIG#)Z)udKWt)VS3ppB{cU!QU;#0q)8MWxTY1|x3owk%?kaJF-XFzacR5e;Q6BRbpZE$>FKJ!8&#iJ4w|y7j4j%b_Whei1jnY&TvM588-^;Px# diff --git a/dynamight/models/__pycache__/decoder.cpython-310.pyc b/dynamight/models/__pycache__/decoder.cpython-310.pyc index 84b55e956d40682598c1a180bfa7b55ee7989ed5..33e666c89e2a15f457287121c1418fc489d2d03b 100644 GIT binary patch delta 112 zcmX@sz<95LkvpH4mx}=iX0J2a$bCT0mKn%)2I67~AW_4R#gN4aB$>c0=5*#-#u~<8 xhN6`~Nllg_TOd_b2O``+#DvLTqEV#s1lXRKwcVGL#{S_u@= jWGb=+Qbl!>Iphtw*nmtn7MA}ktdl3oiEWORXH*0LESC|V diff --git a/dynamight/models/decoder.py b/dynamight/models/decoder.py index 6c822a9..740e19e 100644 --- a/dynamight/models/decoder.py +++ b/dynamight/models/decoder.py @@ -343,8 +343,8 @@ def baseline_parameters(self) -> torch.nn.ParameterList: """Parameters which make up a coordinate model.""" params = [ self.image_smoother.A, - # self.amp - # self.image_smoother.B + self.ampvar, + self.image_smoother.B ] return params