8000 Set model to train mode during training by edmundmills · Pull Request #8 · hendrycks/ethics · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Set model to train mode during training #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions deontology/tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def main(args):

def train(model, optimizer, train_dataloader, epoch, log_interval=10):
# Set model to training mode
model.train()
criterion = torch.nn.BCEWithLogitsLoss()

# Loop over each batch from the training set
Expand Down
1 change: 1 addition & 0 deletions justice/tune.py
Original file line number Diff line number Diff line change
A8BA Expand Up @@ -53,6 +53,7 @@ def main(args):

def train(model, optimizer, train_dataloader, epoch, log_interval=10):
# Set model to training mode
model.train()
criterion = torch.nn.BCEWithLogitsLoss()

# Loop over each batch from the training set
Expand Down
1 change: 1 addition & 0 deletions virtue/tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def main(args):

def train(model, optimizer, train_dataloader, epoch, log_interval=10):
# Set model to training mode
model.train()
criterion = torch.nn.BCEWithLogitsLoss()

# Loop over each batch from the training set
Expand Down
0