CasRel icon indicating copy to clipboard operation
CasRel copied to clipboard

Haha, I use the GPU on my laptop, but I have to set BATCH_SIZE to 1 so I don't run out of memory,there are too many Total params

Open Ding-Chian opened this issue 1 year ago • 1 comments

Haha, I use the GPU on my laptop, but I have to set BATCH_SIZE to 1 so I don't run out of memory,there are too many Total params

Ding-Chian avatar Apr 21 '24 09:04 Ding-Chian

但是你可以在model.py中更改以下代码 for l in bert_model.layers: l.trainable = True

#只是微调后8层(举个例子) trainable_layers = 8 # 后八层 num_layers = len(bert_model.layers) for i, layer in enumerate(bert_model.layers): if i >= num_layers - trainable_layers: layer.trainable = True else: layer.trainable = False 从而减少参数数量

Ding-Chian avatar Apr 21 '24 10:04 Ding-Chian