Calling
triplet_loss = nn.TripletMarginLoss()
results in:
AttributeError: module 'torch.nn' has no attribute 'TripletMarginLoss'
even with
import torch.nn as nn
Related PR that added introduced TripletMarginLoss: #1165
Work-around for now is to use F.triplet_margin_loss
directly, where F
is import torch.nn.functional as F
.
Another workaround would be to add from torch.nn.modules.loss import TripletMarginLoss
.
fixed in master. will be in next release.
Hi, similar thing happens when I call m = nn.Upsample(scale_factor=2, mode='bilinear')
AttributeError: 'module' object has no attribute 'Upsample'
But I can successfully call nn.UpsamplingBilinear2d
.
Besides, is there any plan to implement the Cubic Upsample
~
Most helpful comment
Hi, similar thing happens when I call
m = nn.Upsample(scale_factor=2, mode='bilinear')
AttributeError: 'module' object has no attribute 'Upsample'
But I can successfully call
nn.UpsamplingBilinear2d
.Besides, is there any plan to implement the
Cubic Upsample
~