Deep Learning and NLP enthusiast.
luozhouyang / deepse Goto Github PK
View Code? Open in Web Editor NEWSentence Embeddings using Deep Nerual Networks in PRODUCTION!
License: Apache License 2.0
Sentence Embeddings using Deep Nerual Networks in PRODUCTION!
License: Apache License 2.0
硬件环境:GPU P100 、linux
软件环境一:TF 2.7 、 transformer-keras 0.4.9
软件环境二:TF2.4 ,trainsformer-keras 0.3.1
1、数据正常读取,bert能加载,但是在model.fit报错了
debug信息如下
2021-11-10 10:39:52,766 WARNING utils.py 80] Gradients do not exist for variables ['bert/pooler/dense/kernel:0', 'bert/pooler/dense/bias:0'] when minimizing the loss. If you're using model.compile()
, did you forget to provide a loss
argument?
975/Unknown - 398s 378ms/step - acc: 0.9998 - loss: 0.0051Traceback (most recent call last):
File "run_simcse.py", line 79, in
save_weights_only=False)
File "/usr/local/lib/python3.7/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/usr/local/lib/python3.7/dist-packages/keras/utils/generic_utils.py", line 896, in update
self._values[k][0] += v * value_base
ValueError: operands could not be broadcast together with shapes (64,) (27,) (64,)
更改数据集大小为batch_size的整数倍,无法解决
davidADSP/GDL_code#63
`loss = tf.keras.losses.sparse_categorical_crossentropy(labels, cosine, from_logits=True)`
Line 109 in a7c47c5
这里的loss实际上是对所有的损失求和,需要再做一个reduce_mean操作
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.