currylym
currylym
项目是tf版的,dice loss一直不收敛 ```python def dice_layer(logits, labels, num_labels, input_mask, alpha=0.01, smooth=1): input_mask = tf.cast(input_mask, dtype=tf.float32) input_mask = tf.reshape(input_mask, [-1, 1]) logits = tf.reshape(logits, [-1, num_labels]) prob = tf.sigmoid(logits) prob = prob...
> > ```python > > prob = tf.sigmoid(logits) > > ``` > > 您好,感谢提问。 > 按照我的理解,如果是多分类任务的话: > `prob = tf.sigmoid(logits)`应该是`prob = tf.nn.softmax(logits)`, 对应的`predict = tf.math.argmax(prob, axis=-1)`. > 如果是二分类任务的话: > `prob...
> 项目是tf版的,dice loss一直不收敛 > > ```python > def dice_layer(logits, labels, num_labels, input_mask, alpha=0.01, smooth=1): > input_mask = tf.cast(input_mask, dtype=tf.float32) > input_mask = tf.reshape(input_mask, [-1, 1]) > > logits = tf.reshape(logits,...
@yysirs @crazymirror 请问解决了多gpu训练的问题吗?请教下改完seq_len_to_mask函数后,还需要进行什么操作吗,谢谢🙏
报错信息 ``` Traceback (most recent call last): File "flat_main.py", line 806, in trainer.train() File "/data00/home/luyiming.ez4curry/.local/lib/python3.6/site-packages/fastNLP/core/trainer.py", line 613, in train self.callback_manager.on_exception(e) File "/data00/home/luyiming.ez4curry/.local/lib/python3.6/site-packages/fastNLP/core/callback.py", line 309, in wrapper returns.append(getattr(callback, func.__name__)(*arg)) File "/data00/home/luyiming.ez4curry/.local/lib/python3.6/site-packages/fastNLP/core/callback.py",...
Has the problem been solved?I met the same problem..