yuki3-18 / topological-dvae Goto Github PK
View Code? Open in Web Editor NEWAn implementation of Denoising Variational AutoEncoder with Topological loss
An implementation of Denoising Variational AutoEncoder with Topological loss
File "/homes/qinan/miniconda3/envs/3DUNet/lib/python3.6/site-packages/topologylayer/functional/sublevel.py", line 45, in backward
return None, grad_f.view(retshape).to(device), None, None
RuntimeError: shape '[256, 256, 96]' is invalid for input of size 58
sorry , when I use the loss function have the above error. Could you please give me some advices?
I change something to fit my model, the following is my code. But we I use the loss function in my train.py, loss.backward() have the above error.
def topological_loss(recon_x):
batch_size = recon_x.size(0)
b01, b0, b1, b2 = 0., 0., 0., 0.
cpx = init_tri_complex_3d(10, 10, 10๏ผ
layer = LevelSetLayer(cpx, maxdim=2, sublevel=False)
f01 = TopKBarcodeLengths(dim=0, k=1)
f0 = PartialSumBarcodeLengths(dim=0, skip=1)
f1 = SumBarcodeLengths(dim=1)
f2 = SumBarcodeLengths(dim=2)
for i in range(batch_size):
dgminfo = layer(recon_x.view(batch_size, patch_side, patch_side, patch_side)[i])
b01 += ((1. - f01(dgminfo))).sum()
b0 += (f0(dgminfo)).sum()
b1 += (f1(dgminfo)).sum()
b2 += (f2(dgminfo)).sum()
b01 = b01.div(batch_size)
b0 = b0.div(batch_size)
b1 = b1.div(batch_size)
b2 = b2.div(batch_size)
topo = b01 + b0 + b1 + b2
return topo
Hello, author
I am reproducing your paper currently, and I don't understand how to make the file'pytorch/vae/filename.txt' ? If it's convenient, just let me know. Thanks so much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.