mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-03 03:31:05 +06:00
Display the number of trainable parameters when lauching a training (#19835)
This commit is contained in:
parent
536f338441
commit
0b59ecdefd
@ -1611,6 +1611,9 @@ class Trainer:
|
||||
logger.info(f" Total train batch size (w. parallel, distributed & accumulation) = {total_train_batch_size}")
|
||||
logger.info(f" Gradient Accumulation steps = {args.gradient_accumulation_steps}")
|
||||
logger.info(f" Total optimization steps = {max_steps}")
|
||||
logger.info(
|
||||
f" Number of trainable parameters = {sum(p.numel() for p in model.parameters() if p.requires_grad)}"
|
||||
)
|
||||
|
||||
self.state.epoch = 0
|
||||
start_time = time.time()
|
||||
|
Loading…
Reference in New Issue
Block a user