File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,12 @@ def forward(
103103 if self .is_key_proj :
104104 text_enc_with_superclass_output = text_enc_with_superclass_output .detach ()
105105
106- online_estimated_concept_enc = decay * superclass_text_enc + (1. - decay ) * concept_text_enc
106+ # only during training do they exponentially smooth
107+
108+ if self .training :
109+ online_estimated_concept_enc = decay * superclass_text_enc + (1. - decay ) * concept_text_enc
110+ else :
111+ online_estimated_concept_enc = concept_text_enc
107112
108113 # make it easier to match with paper
109114
Original file line number Diff line number Diff line change 33setup (
44 name = 'perfusion-pytorch' ,
55 packages = find_packages (exclude = []),
6- version = '0.0.5 ' ,
6+ version = '0.0.6 ' ,
77 license = 'MIT' ,
88 description = 'Perfusion - Pytorch' ,
99 author = 'Phil Wang' ,
You can’t perform that action at this time.
0 commit comments