CasRel
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
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
但是你可以在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 从而减少参数数量