![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nlp
文章平均质量分 50
holasyb
这个作者很懒,什么都没留下…
展开
-
PyTorch 实现 tf.keras.losses.categorical_crossentropy
使用 PyTorch 实现 tf 中的 tf.keras.losses.categorical_crossentropy,或者 K.categorical_crossentropyimport tensorflow as tfy_true = [[[0.,0.9]]]y_pred = [[[0.4,0.6]]]loss = tf.keras.losses.categorical_crossentropy(y_true, y_pred)loss.numpy()print('tf.keras原创 2022-02-09 10:07:28 · 3206 阅读 · 0 评论 -
陈丹琦 关系抽取 2020 sota ner
关于数据部分在这里:陈丹琦 关系抽取 数据部分https://blog.csdn.net/holasyb/article/details/121549733?spm=1001.2014.3001.5501这篇聊一聊实体抽取部分的网络模型。 def run_batch(self, samples_list, try_cuda=True, training=True): # convert samples to input tensors tokens_tenso原创 2021-11-27 22:34:42 · 694 阅读 · 1 评论