devalab / ding Goto Github PK
View Code? Open in Web Editor NEWDeep learning enabled for INorganic material Generator (https://doi.org/10.1039/D0CP03508D)
License: MIT License
Deep learning enabled for INorganic material Generator (https://doi.org/10.1039/D0CP03508D)
License: MIT License
For now I have been trying to reproduce train_generator.ipnyb notebook. But once I get to run
vae.fit([X_train, y_train], X_train, batch_size=256, epochs=150, validation_split=0.2,callbacks=[reduce_lr,checkpoint,save_loss, DecoderSaveCheckpoint('ding_decoder_best.h5', decoder)])
the following issue appears:
TypeError: in user code:
File "C:\Users\hp\AppData\Roaming\Python\Python38\site-packages\keras\engine\training.py", line 878, in train_function *
return step_function(self, iterator)
File "C:\Users\hp\AppData\Roaming\Python\Python38\site-packages\keras\engine\training.py", line 867, in step_function **
outputs = model.distribute_strategy.run(run_step, args=(data,))
File "C:\Users\hp\AppData\Roaming\Python\Python38\site-packages\keras\engine\training.py", line 860, in run_step **
outputs = model.train_step(data)
File "C:\Users\hp\AppData\Roaming\Python\Python38\site-packages\keras\engine\training.py", line 809, in train_step
loss = self.compiled_loss(
File "C:\Users\hp\AppData\Roaming\Python\Python38\site-packages\keras\engine\compile_utils.py", line 239, in __call__
self._loss_metric.update_state(
File "C:\Users\hp\AppData\Roaming\Python\Python38\site-packages\keras\utils\metrics_utils.py", line 73, in decorated
update_op = update_state_fn(*args, **kwargs)
File "C:\Users\hp\AppData\Roaming\Python\Python38\site-packages\keras\metrics.py", line 177, in update_state_fn
return ag_update_state(*args, **kwargs)
File "C:\Users\hp\AppData\Roaming\Python\Python38\site-packages\keras\metrics.py", line 451, in update_state **
sample_weight = tf.__internal__.ops.broadcast_weights(
File "C:\Users\hp\AppData\Roaming\Python\Python38\site-packages\keras\engine\keras_tensor.py", line 255, in __array__
raise TypeError(
TypeError: You are passing KerasTensor(type_spec=TensorSpec(shape=(), dtype=tf.float32, name=None), name='Placeholder:0', description="created by layer 'tf.cast_4'"), an intermediate Keras symbolic input/output, to a TF API that does not allow registering custom dispatchers, such as `tf.cond`, `tf.function`, gradient tapes, or `tf.map_fn`. Keras Functional model construction only supports TF API calls that *do* support dispatching, such as `tf.math.add` or `tf.reshape`. Other APIs cannot be called directly on symbolic Kerasinputs/outputs. You can work around this limitation by putting the operation in a custom Keras layer `call` and calling that layer on this symbolic input/output.
I have actually created a dedicated environment installing all dependencies using requirements.txt
.
EDIT:
OK I think I have solved the issue in the following way:
before constructing the model just run
from tensorflow.python.framework.ops import disable_eager_execution
disable_eager_execution()
Since we are using a custom loss function, I have also specified
experimental_run_tf_function=False
in model.compile()
Hi DING author,
This work looks really interesting and I would like to customize it for catalyst discovery usage, but I am not sure about the original dataset's format can you share the oqmd_test.csv data which you have used? Even a small portion version contains only few rows can help us.
Best and many thanks in advance,
Yuan
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.