Skip to content

Cascade and tensorflow 2 #17

@steto123

Description

@steto123

Dear colleagues,

I have not completely given up on the attempt to operate CASCADE as a local version. Unfortunately, TensorFlow 2 is no longer backward compatible. However, a user here has created a modified copy of CASCADE. I have also managed to do the same in terms of syntax, but both variants (predict_nmr_xyzfile.ipynb and the .py version) fail due to the following problem: There appears to be an issue when reading the trained network. The error message is as follows: Cannot assign value to variable 'atomwise_shift/embeddings:0': Shape mismatch. The variable shape (10, 10) and the assigned value shape (10, 1) are incompatible.

I then displayed the structure of the learned network, which was done with:

open HDF5-file

with h5py.File(file_path, 'r') as file:
#show structure
def print_structure(name, obj):
print(f"{name}: {obj}")

#go through all data
file.visititems(print_structure)

and one of the properties is following:
model_weights/atomwise_shift/atomwise_shift_1/embeddings:0: <HDF5 dataset "embeddings:0": shape (10, 1), type "<f4">

But i do not find how can i reshape this in the code.

Has anybody a good idea?

Many thanks

Steffen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions