Closed DaveRichmond- closed 7 years ago
Hi Dave,
I don't think the TODO affects you at all here.
When exactly did you install this PyDenseCRF? Your issue looks exactly like #34 which I fixed ~16h ago. Could you please make sure you're running with these latest changes?
Cheers, Lucas
Hi Lucas,
Thanks. I re-installed and everything is working now. (I had installed 24hours ago).
Best, Dave
Hi Lucas,
I'm trying to run pydensecrf on a new computer. I just installed everything and I get a new bug (everything was working fine with previous installation a few months ago).
I think the easiest way to confirm the problem is to run the example: Non RGB Example. Stepping through this example, in Cell #4 I get the following error:
ValueError: Bad shape for unary energy (Need (400, 512), got (2, 204800))
Looking into the code a little bit further, I see the following "TODO" item (copied at end of message). I'm rather confused, because it seems like my unary energy is the correct shape. Please advise.
Thanks, Dave
def setUnaryEnergy(self, float[:,::1] u not None, float[:,::1] f = None): if u.shape[0] != self._nlabel or u.shape[1] != self._nvar: raise ValueError("Bad shape for unary energy (Need {}, got {})".format((self._nlabel, self._nvar), (u.shape[0], u.shape[1])))
TODO: I don't remember the exact shape
f
should have, so I'm not putting an assertion here.