Spaces:
Sleeping
Sleeping
Update app.py
Browse files125 unmodified lines126127128129130131129132133134135125 unmodified lines name = name[7:] new_state_dict[name] = v # strict=False๋ฅผ ์ฌ์ฉํ์ฌ Missing key(s) ์ค๋ฅ๋ฅผ ๋ฐฉ์งํฉ๋๋ค. # ์ด๋ new_state_dict์ ์๋ ํค๋ ๋ชจ๋ธ์์ ๊ธฐ์กด ๊ฐ(from_pretrained๋ก ๋ก๋๋)์ ์ ์งํ๊ณ , # ๋ชจ๋ธ์ ์๋ ํค๋ ๋ฌด์ํ๋๋ก ํฉ๋๋ค. model.load_state_dict(new_state_dict) model.load_state_dict(new_state_dict, strict=False) # --- ์์ ๋ ํต์ฌ ๋ถ๋ถ ๋ ---
model.to(device) # ๋ชจ๋ธ์ ๋๋ฐ์ด์ค๋ก ์ด๋app.py+4-1