-
Notifications
You must be signed in to change notification settings - Fork 298
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
Rewrite comments in training configuration to be more newbie friendly #654
Open
dubslow
wants to merge
2
commits into
glinscott:next
Choose a base branch
from
dubslow:traincomments
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,50 @@ | ||
%YAML 1.2 | ||
--- | ||
# Training works as follows: one `step` means loading `batch_size` | ||
# samples into GPU memory, then doing gradient descent on those samples. | ||
# Leela training is done in discrete cycles (unlike A0's fancy | ||
# continuous-distributed setup), with the new weights being published | ||
# after each cycle. A cycle does `total_steps` of training. The | ||
# samples are selected from `num_chunks` games, at random (controlled | ||
# by the "shuffle buffer" of size `shuffle_size`). Only `train_ratio` | ||
# games are used for training, the remainder being used for testing. | ||
# Thus, the total number of times that a given position is trained on, | ||
# samples per position, is given by | ||
# `total_steps` * `batch_size` / (`num_chunks` * `train_ratio` * ply_per_game) | ||
|
||
name: 'kb1-64x6' # ideally no spaces | ||
gpu: 0 # gpu id to process on | ||
|
||
dataset: | ||
num_chunks: 100000 # newest nof chunks to parse | ||
train_ratio: 0.90 # trainingset ratio | ||
input: '/path/to/chunks/*/draw/' # supports glob | ||
train_ratio: 0.90 # fraction of games for training (instead of testing) | ||
input: '/path/to/chunks/*/draw/' # path to data dir; supports glob | ||
|
||
training: | ||
batch_size: 2048 # training batch | ||
total_steps: 140000 # terminate after these steps | ||
shuffle_size: 524288 # size of the shuffle buffer | ||
lr_values: # list of learning rates | ||
batch_size: 2048 # samples trained in one step | ||
total_steps: 140000 # number of training steps per publishing cycle | ||
shuffle_size: 524288 | ||
lr_values: # learning rate schedule | ||
- 0.02 | ||
- 0.002 | ||
- 0.0005 | ||
lr_boundaries: # list of boundaries | ||
lr_boundaries: # "boundaries" are in units of steps | ||
- 100000 | ||
- 130000 | ||
policy_loss_weight: 1.0 # weight of policy loss | ||
value_loss_weight: 1.0 # weight of value loss | ||
policy_loss_weight: 1.0 # weight of policy head relative to regularization | ||
value_loss_weight: 1.0 # weight of value head relative to regularization | ||
path: '/path/to/store/networks' # network storage dir | ||
|
||
model: | ||
filters: 64 | ||
residual_blocks: 6 | ||
... | ||
|
||
# `lr_values` is the set of learning rates, used according to the | ||
# `lr_boundaries` schedule of using a given learning rate for how | ||
# many training steps. | ||
# `policy_loss_weight` and `value_loss_weight` determine how much | ||
# either the policy head or value head should be emphasized by the | ||
# gradient descent, relative to each other and to the regularization | ||
# (where regularization helps keep weights closer to 0, which helps | ||
# the network to generalize better to novel positions) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand the relationship between boundaries and value, or when a particular value is selected based on the boundary. Maybe include an example?