conditional-similarity-networks icon indicating copy to clipboard operation
conditional-similarity-networks copied to clipboard

Deprecated APIs

Open ahmdtaha opened this issue 6 years ago • 1 comments

The current code base calls a couple of deprecated functions. I use 1)Python 3.6.5 :: Anaconda, Inc. 2) Pytorch 0.4.1

return (pred > 0.0).sum()*1.0/dista.size()[0] should become >>>>>> return (pred > 0.0).sum().float() *(1.0/dista.size()[0])

self.viz.updateTrace(X=np.array([x]), Y=np.array([y]), env=print_env, win=self.plots[var_name], name=split_name) should become >>>>>> self.viz.line(X=np.array([x]), Y=np.array([y]), env=print_env, win=self.plots[var_name], name=split_name,update='append')

There are probably more similar issues but these are the ones I can confirm now

ahmdtaha avatar Sep 17 '18 22:09 ahmdtaha

amazing!! thx~

DaPenggg avatar Dec 08 '18 01:12 DaPenggg