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
from convcrf import convcrf
config = convcrf.default_conf
shape = [3,416,416]
nclasses = 15
crf = convcrf.GaussCRF(config, shape, nclasses)
crf.cuda()
img = torch.randn(1,3,416,416).cuda()
un = torch.randn(1,15,416,416).cuda()
un = torch.softmax(un,dim=1)
pred = crf.forward(un, img)
ERROR:
Traceback (most recent call last):
File "", line 1, in
pred = crf.forward(un, img)
File "...\anaconda3\lib\site-packages\convcrf-1.0-py3.7.egg\convcrf\convcrf.py", line 202, in forward
compats, conf['merge'])
File "...\anaconda3\lib\site-packages\convcrf-1.0-py3.7.egg\convcrf\convcrf.py", line 574, in add_pairwise_energies
pyinn=self.pyinn)
File "...\anaconda3\lib\site-packages\convcrf-1.0-py3.7.egg\convcrf\convcrf.py", line 311, in init
gaussian = self._create_convolutional_filters(feats)
File "...\anaconda3\lib\site-packages\convcrf-1.0-py3.7.egg\convcrf\convcrf.py", line 353, in _create_convolutional_filters
count_include_pad=False)
RuntimeError: non-empty 3D or 4D (batch mode) tensor expected for input
The text was updated successfully, but these errors were encountered:
ERROR:
Traceback (most recent call last):
File "", line 1, in
pred = crf.forward(un, img)
File "...\anaconda3\lib\site-packages\convcrf-1.0-py3.7.egg\convcrf\convcrf.py", line 202, in forward
compats, conf['merge'])
File "...\anaconda3\lib\site-packages\convcrf-1.0-py3.7.egg\convcrf\convcrf.py", line 574, in add_pairwise_energies
pyinn=self.pyinn)
File "...\anaconda3\lib\site-packages\convcrf-1.0-py3.7.egg\convcrf\convcrf.py", line 311, in init
gaussian = self._create_convolutional_filters(feats)
File "...\anaconda3\lib\site-packages\convcrf-1.0-py3.7.egg\convcrf\convcrf.py", line 353, in _create_convolutional_filters
count_include_pad=False)
RuntimeError: non-empty 3D or 4D (batch mode) tensor expected for input
The text was updated successfully, but these errors were encountered: