Comments (1)
但是你可以在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
从而减少参数数量
from casrel.
Related Issues (20)
- 能否提供一份requirements.txt HOT 1
- AttributeError HOT 12
- 环境问题 HOT 1
- 内存占用问题
- python run.py 时出现 AttributeError: 'tuple' object has no attribute 'layer' HOT 2
- 运行run.py文件时显示tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files HOT 3
- tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[6] = [6, -1] does not index into param shape [8,105,768] [[{{node lambda_3/GatherNd}}]] HOT 2
- if not a['relationMentions']: TypeError: list indices must be integers or slices, not str HOT 1
- Tensorflow and keras versions not compatible
- 'Node' object has no attribute 'output_masks'
- Prepare my own text dataset HOT 1
- 关于更换数据集的格式问题 HOT 2
- 运行run.py报错, HOT 1
- Result is very poor
- Need Help for same problem #48
- 求环境 HOT 3
- 显示无法找到该文件,saved_weights/NYT/best_model.weights' HOT 3
- 求一份训练好的best_model.weights
- I followed the instructions in the README exactly, but I'm getting this error when running "python run.py --train=True --dataset=NYT". Can anyone tell me how to fix it? I appreciate any help! My environment has been modified according to everyone's suggestions. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from casrel.