Berufung
triplet_loss = nn.TripletMarginLoss()
ergibt:
AttributeError: module 'torch.nn' has no attribute 'TripletMarginLoss'
sogar mit
import torch.nn as nn
Verwandte PR, die TripletMarginLoss hinzugefügt haben: #1165
Die Umgehung für den Moment besteht darin, F.triplet_margin_loss
direkt zu verwenden, wobei F
import torch.nn.functional as F
.
Eine andere Problemumgehung wäre das Hinzufügen von from torch.nn.modules.loss import TripletMarginLoss
.
im Meister fixiert. wird in der nächsten Ausgabe sein.
Hallo, Ähnliches passiert, wenn ich m = nn.Upsample(scale_factor=2, mode='bilinear')
AttributeError: 'module'-Objekt hat kein Attribut 'Upsample'
Aber ich kann erfolgreich nn.UpsamplingBilinear2d
anrufen.
Gibt es außerdem einen Plan, die Cubic Upsample
~
Hilfreichster Kommentar
Hallo, Ähnliches passiert, wenn ich
m = nn.Upsample(scale_factor=2, mode='bilinear')
AttributeError: 'module'-Objekt hat kein Attribut 'Upsample'
Aber ich kann erfolgreich
nn.UpsamplingBilinear2d
anrufen.Gibt es außerdem einen Plan, die
Cubic Upsample
~