mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #274] How to restart the training from checkpoint? #240
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#240
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @snow1929 on GitHub (Jul 27, 2022).
Original GitHub issue: https://github.com/openai/CLIP/issues/274
Hi,
I want to train the model with my dataset.
But there is a little question , would you please help me.
How to restart the training from checkpoint?
How to import the checkpoint of CLIP model to calculate cosine similarity ?
@sarveshwar-s commented on GitHub (Jul 27, 2022):
model.load_state_dict("checkpoint_file_name.pt", map_location=device)
You can replace device with "cuda" or "cpu"
For more info on loading checkpoints look into torch documentation: Load checkpoints
@snow1929 commented on GitHub (Aug 1, 2022):
Hi, @sarveshwar-s @vinson2233
I try to train the CLIP model by my datasets.
With the code
[CLIP Training Code](https://github.com/openai/CLIP/issues/83)
In the training of my code , the total_loss is always the same .

But I have no idea what's wrong with it.
column
[epoch] total_loss