腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(155)
视频
沙龙
1
回答
为什么判别器和发电机的损失没有变化?
python
、
pytorch
、
mnist
、
loss
、
generative-adversarial-network
nn.Sigmoid()criterion = nn.
BCEWithLogitsLoss
浏览 34
提问于2019-05-01
得票数 1
1
回答
Keras中的
BCEWithLogitsLoss
python
、
keras
、
deep-learning
、
loss-function
如何在使用Tensorflow作为后台的情况下,在keras中实现
BCEWithLogitsLoss
,并将其作为自定义损失函数。我在PyTorch中使用了torch中定义的
BCEWithLogitsLoss
。 如何在Keras中实现同样的功能?
浏览 38
提问于2019-04-15
得票数 2
回答已采纳
1
回答
在Pytorch上使用sigmoid输出进行交叉熵损失
python
、
pytorch
、
loss-function
、
cross-entropy
1 (假设我们总共只有5个类,每个类只有1个类,所以其中只有一个数字1,当然这是本例中的第5个类)我发现了一些使用nn.BCE / nn.
BCEWithLogitsLoss
浏览 0
提问于2020-09-16
得票数 2
1
回答
“
BCEWithLogitsLoss
”对象没有属性“向后”错误PyTorch
pytorch
、
text-classification
、
loss-function
、
backpropagation
、
bert-language-model
在对丢失调用反向()时,我遇到了一个奇怪的错误,如下所示 print(outputs) prin
浏览 1
提问于2020-11-25
得票数 0
1
回答
多标号分类张量的输出激活函数
python
、
pytorch
、
loss-function
在输出和标签上直接使用
BCEWithLogitsLoss
是错误的吗?在使用
BCEWithLogitsLoss
之前,我是否需要将输出张量转换为类似于预期标签的二进制张量?我知道
BCEWithLogitsLoss
只是BCELoss + Sigmoid激活。如何获得期望的标签张量类型的值,以及在这种情况下应该使用什么损失?
浏览 1
提问于2020-09-20
得票数 2
回答已采纳
1
回答
Pytorch正在抛出一个错误RuntimeError:不能将结果类型浮点数转换为所需的输出类型Long
python-3.x
、
pytorch
、
torch
>>> t = torch.tensor([[1, 0, 1, 1]]).T>>> torch.nn.
BCEWithLogitsLoss
()(p, t)
浏览 4
提问于2021-12-03
得票数 0
回答已采纳
3
回答
PyTorch的类
BCEWithLogitsLoss
是如何精确实现的?
python
、
deep-learning
、
pytorch
、
implementation
、
loss
根据的说法,类
BCEWithLogitsLoss
()的优点是可以使用 我现在简化了这些术语,并在计算了几行之后得到:我很想知道是不是这样做的
浏览 0
提问于2021-04-01
得票数 5
1
回答
binary_cross_entropy_with_logits:体重和pos_weight的区别是什么?
pytorch
根据Pytorch关于的文档,它们被描述为: 如果我同时设置了这两个参数呢?例如:target = torch.zeros((4, 100, 50,
浏览 21
提问于2022-03-31
得票数 0
1
回答
Python (Python)丢失函数语法
loss-function
、
pytorch
我看到了许多用于loss函数的语法示例,具体如下:有人能解释一下(pred,y)到底是做什么的,它直接计算损失,而不是调用损失作为这两个参数的函数
浏览 0
提问于2020-09-06
得票数 1
回答已采纳
1
回答
BCEWithLogitsLoss
多标签分类
machine-learning
、
deep-learning
、
pytorch
、
classification
、
multilabel-classification
optimizer = torch.optim.Adam(model.parameters, lr=1e-3, weight_decay=1e-5) criterion = torch.nn.
BCEWithLogitsLoss
浏览 4
提问于2022-07-12
得票数 1
1
回答
Pytorch:将一维目标重塑为二维目标
pytorch
我有一个二进制分类问题,我一直在使用CrossEntropyLoss解决这个问题,它需要以下输入和目标张量维度:我已经转而使用带有预先计算的类权重的
BCEWithLogitsLoss
来解决标签不平衡问题问题是
BCEWithLogitsLoss
需要以下尺寸:我该如何去塑造我的一维张量,即。
浏览 35
提问于2021-02-18
得票数 0
回答已采纳
1
回答
pytorch
BCEWithLogitsLoss
计算pos_weight
neural-network
、
pytorch
BCE_With_LogitsLoss=nn.
BCEWithLogitsLoss
(pos_weight=class_wts[0]/class_wts[1])基于Shai的回答,我有以下问题:
BCEWithLogitsLoss
-如果这是一个多类问题
浏览 3
提问于2022-03-14
得票数 1
回答已采纳
1
回答
如何利用torch.nn.CrossEntropyLoss作为自动编码器的重构损失?
python
、
machine-learning
、
deep-learning
、
pytorch
、
cross-entropy
我想使用CrossEntropyLoss计算我的自动编码器的重建精度:ae_loss = ae_criterion(X, Y) 在查看了这些文档之后,我仍然不
浏览 0
提问于2019-04-12
得票数 0
1
回答
RuntimeError:还原后的步骤2:设备端断言木星笔记本上触发的火炬
python-3.x
、
binary
、
gpu
、
pytorch
我正在训练一个二进制分类器,使用Py手电筒在木星笔记本上。结构如下: def __init__(self, num_classes=1): self.conv_base = nn.Sequential( nn.BatchNorm2d(96),
浏览 0
提问于2019-05-29
得票数 2
1
回答
Pytorch图像分割问题BCELoss
python
、
pytorch
我尝试了适用于我的
BCEWithLogitsLoss
函数,但它没有显示正确的输出图像,并且它慢慢地训练成一张黑色图像,而不是GrayScale类图像。Append_files() #loss_func = nn.
BCEWithLogitsLoss
浏览 0
提问于2019-08-08
得票数 0
1
回答
`pos_weight`参数在“`
BCEWithLogitsLoss
`”中的影响是什么?
machine-learning
、
pytorch
根据 of nn.
BCEWithLogitsLoss
,pos_weight是一个可选的参数a,它考虑了正面例子的权重。
浏览 2
提问于2022-02-09
得票数 0
2
回答
割炬语义分割损失函数
pytorch
、
conv-neural-network
、
image-segmentation
、
semantic-segmentation
我试着用nn.
BCEWithLogitsLoss
()。 ,对我的情况,这是正确的损失函数吗?或者我应该使用CrossEntropy?为了使[32, 256, 256]张量与输入到
BCEWithLogitsLoss
的目标相匹配,是否需要将未命名的概率转换为类?如果使用CrossEntropy,输出和标签的大小应该是多少?
浏览 0
提问于2021-05-08
得票数 2
回答已采纳
1
回答
RuntimeError: torch.nn.functional.binary_cross_entropy和torch.nn.BCELoss对自动广播不安全
python
、
deep-learning
、
pytorch
、
torch
、
torchvision
case, combine the two layers using torch.nn.functional.binary_cross_entropy_with_logits or torch.nn.
BCEWithLogitsLoss
浏览 107
提问于2022-06-07
得票数 0
1
回答
RuntimeError:_th_exp_out长期不受CUDAType支持
python
、
machine-learning
、
pytorch
问题和帮助def loss_fn(self, preds, labels): def
浏览 0
提问于2020-06-21
得票数 0
回答已采纳
1
回答
如何在教育模式培训中处理NotImplementedError?
python
、
tensorflow
、
machine-learning
、
image-segmentation
def train_fn(data_loader, model, optimizer): total_loss = 0.0 masks = masks.to(DEVICE) logits, loss = model(images,masks) optimizer.step() total_loss += loss.item
浏览 15
提问于2022-07-06
得票数 0
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
一种基于目标检测实现黑花屏分类任务的方案
这些老照片如何用算法修复?
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券