You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I still confuse with how cross entrophy loss in pytorch works in 1D data. Here is my condition:
-I have 3 classes
-Input = (NCW) output=(N,W) --> Input(64,3,640), output=(64,640)
-Actually I have tried to use nn.CrossEntrophyLoss but something wrong with dimension, and then I try to unsqueeze it and treat it as image.
-After unsqueeze --> Input = (NCHW) output=(NHW) --> Input(64,3,1,640), output=(64,1,640)
-Then I follow your CrossEntrophyLoss2D function but I got this error: RuntimeError: invalid argument 3: only batches of spatial targets supported (3D tensors) but got targets of dimension: 2 at /opt/conda/conda-bld/pytorch-nightly_1538995270066/work/aten/src/THNN/generic/SpatialClassNLLCriterion.c:59
The text was updated successfully, but these errors were encountered:
Hello I still confuse with how cross entrophy loss in pytorch works in 1D data. Here is my condition:
-I have 3 classes
-Input = (NCW) output=(N,W) --> Input(64,3,640), output=(64,640)
-Actually I have tried to use
nn.CrossEntrophyLoss
but something wrong with dimension, and then I try tounsqueeze
it and treat it as image.-After unsqueeze --> Input = (NCHW) output=(NHW) --> Input(64,3,1,640), output=(64,1,640)
-Then I follow your
CrossEntrophyLoss2D
function but I got this error:RuntimeError: invalid argument 3: only batches of spatial targets supported (3D tensors) but got targets of dimension: 2 at /opt/conda/conda-bld/pytorch-nightly_1538995270066/work/aten/src/THNN/generic/SpatialClassNLLCriterion.c:59
The text was updated successfully, but these errors were encountered: