kaist-amsg / composition-conditioned-crystal-gan Goto Github PK
View Code? Open in Web Editor NEWComposition-Conditioned Crystal GAN pytorch code
Composition-Conditioned Crystal GAN pytorch code
Dear Developers
@syaym
I am trying to train using mgmno_2000,pickle. I am running it on Google Colab, and in the last line of the train.py, I am getting a Runtime Error: Mismatch in shape: grad_output[0] has a shape of torch.Size([1]) and output[0] has a shape of torch.Size([]).
I am attaching a screenshot of the same.
The line where I am facing the error:
if name == 'main':
print("not import")
main()
else:
print("import")
pass
Dear Composition-Conditoned-Crystal Gan developers.
I'm now trying to run your github code of your paper
'Generative Adversarial Networks for Crystal Structure Prediction'
In order to run the train.py , it needs the training data mgmno_2000.pickle
and I cannot found the training data on the github.
Then, I had make the training data by run
However, the train.py code did not work with the generated training data.
I see the code of train.py then, found the problems below,
The training data are assumed to be packed with crystal images and labels in the code
like,
for j, (imgs, label) in enumerate(dataloader):
batch_size = img.shape[0]
real_imgs = img.view(batch_size,1,30,3)
I think it assumes images (denoted as C in your paper : the representation of the crystal structure)
and labels (denoted as A in your paper, the atomic status ) for the training data.
However, in the codes of data preparation (6.data_augmentation_mgmno.py)
the only images data is dumped. Atom status is not generated from the scripts for data preparation on the github.
On the S.I of your paper, the loss function of the classifier are written as
L_class_comp = CE(C_real,\hat(C_real) + lamba1 CE(C_gen, \hat(C_gen))
L_class_atm = CE(A_real,\hat(A_real) + lamba1 CE(A_gen, \hat(A_gen))
L_class = L_class_atom + lambdaC * L_class_comp
On the other hand, in the code (train.py)
cat_loss_real = 0.3*(cat_loss_mg_real + cat_loss_mn_real + cat_loss_o_real) + cat_loss_mg_real2+cat_loss_mn_real2 + cat_loss_o_real
it seems L_class is given like
L_class = L_class_comp + 0.3 * L_class_atom
Furthermore, in the code (train.py), it does not considered the loss function term
CE(Agen,\hat(A_gen) . In the code of train.,py
fake_mg_label fake_mn_label, fale_o_label, fake_mg_cat, ,,,,, = net_Q(fake)
fake_mg_label, fake_mn_label, fake_o_label are not used in the code, and not implemented the
loss function term CE(A_gen, \hat(A_gen)) .
If I can get your reply, I'm very happy.
Sincerely,
Yukihiro Okuno.
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.