Skip to content
Open
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
4 changes: 3 additions & 1 deletion summac/model_summac.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ def __init__(self, models=["mnli", "anli", "vitc"], bins='even50', granularity="
os.system("wget https://github.com/tingofurro/summac/raw/master/summac_conv_vitc_sent_perc_e.bin")
assert bins == "percentile", "bins mode should be set to percentile if using the default 1-d convolution weights."
if start_file is not None:
print(self.load_state_dict(torch.load(start_file)))
res = self.load_state_dict(torch.load(start_file))
if res.missing_keys or res.unexpected_keys:
print(res)

def build_image(self, original, generated):
images = [imager.build_image(original, generated) for imager in self.imagers]
Expand Down