Coder Social home page Coder Social logo

Comments (11)

Romit-Maulik avatar Romit-Maulik commented on May 18, 2024 1

Can you try running the same python script but uncomment keras.utils.plot_model(model, 'ml_model.png', show_shapes=True) - it looks like you don't have GraphViz on your machine.

from tensorflowfoam.

Romit-Maulik avatar Romit-Maulik commented on May 18, 2024 1

Yes the training dataset is already available in Total_dataset.npy for different heights. The cx, cy scalars correspond the x,y coordinates in the computational domain.

from tensorflowfoam.

chandukec avatar chandukec commented on May 18, 2024

Hello, Sorry for the multiple posts, for the issue 1 getting after pip install -r requirements.txt
I managed to forcefully install the terminado using pip install terminado==0.8.3 --user --ignore-installed
and then when trying to python ML_Model.py, I am getting the errors:

WARNING: Logging before flag parsing goes to stderr.
W1215 16:02:43.129057 140239487671168 module_wrapper.py:139] From ML_Model.py:13: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.

W1215 16:02:45.213897 140239487671168 deprecation.py:506] From /home/csp/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
Traceback (most recent call last):
  File "ML_Model.py", line 158, in <module>
    model = get_model(num_inputs,num_outputs,6,40)
  File "ML_Model.py", line 68, in get_model
    keras.utils.plot_model(model, 'ml_model.png', show_shapes=True)
  File "/home/csp/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/utils/vis_utils.py", line 283, in plot_model
    dpi=dpi)
  File "/home/csp/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/utils/vis_utils.py", line 102, in model_to_dot
    if not check_pydot():
  File "/home/csp/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/utils/vis_utils.py", line 50, in check_pydot
    pydot.Dot.create(pydot.Dot())
  File "/home/csp/anaconda3/lib/python3.7/site-packages/pydotplus/graphviz.py", line 1960, in create
    'GraphViz\'s executables not found')

Could you kindly help?

from tensorflowfoam.

chandukec avatar chandukec commented on May 18, 2024

Hello Romit,
Many thanks for your prompt reply and help, I commented it, and it worked. But in the last step when I am trying to the RANS case using the simpleFoam_ML in Testing, I am getting the following error:

2021-12-16 09:07:54.970500: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA
2021-12-16 09:07:55.013029: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3499910000 Hz
2021-12-16 09:07:55.014298: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x56211c521560 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-12-16 09:07:55.014346: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
/* Value of relative step height (hh_) is */1.9
*** stack smashing detected ***: terminated

Could you please help further? Also if I wanted to run the LES case, what needs to be done, since in the README.md pdf it is mentioned that work in progress.

from tensorflowfoam.

Romit-Maulik avatar Romit-Maulik commented on May 18, 2024

Hmm - I have never seen that error - it may be related to the use of OpenFOAM v 1906 instead of OpenFOAM 5. I believe there were some other issues (although they never had that specific error).

from tensorflowfoam.

chandukec avatar chandukec commented on May 18, 2024

To have a fresh start, I tried to repeat the instructions, and instead of installing TensorFlow C library version 1.15.0 I tried to install the TensorFlow C library version 2.7.0-dev20211101, thereby I am getting no warning while executing g++ hello_tf.cpp -ltensorflow. Now, while trying to generate the data using python training_data_maker.py I am getting the following error:

Velocity reader file
Traceback (most recent call last):
  File "training_data_maker.py", line 58, in <module>
    U = read_vector(f'U_{i}')
  File "training_data_maker.py", line 32, in read_vector
    file = open(filename,'r')
FileNotFoundError: [Errno 2] No such file or directory: 'U_1'

I guess instead of generating the data, Total_dataset.npy is already there in OF_Data, should I use that ? Inside the training_data_marker.py , is the code reads and writes NumPy error corresponding to the cases of varying height and not with varying velocities? What are the cx and cy scalars in the code? Sorry for the multiple queries, but wanted to understand so that I could implement this for our case study, hope you understand.

from tensorflowfoam.

chandukec avatar chandukec commented on May 18, 2024

Hello, I tried again but unfortunately got a similar kind of error (a bit changed):

2021-12-19 08:27:05.455261: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
/* Value of relative step height (hh_) is */1.9
*** stack smashing detected ***: terminated

from tensorflowfoam.

chandukec avatar chandukec commented on May 18, 2024

Hi again, maybe I am not able to compile the ML turbulence model correctly, in Step 3: Compile ML turbulence model , using wclean && wmake libso I am getting the warnings/errors:

Making dependency list for source file tf_utils.C
wmkdepend: parse error while scanning 'tf_utils.H' ... perhaps missing a final newline
wmkdepend: parse error while scanning 'tf_utils.C' ... perhaps missing a final newline
Making dependency list for source file maketurbulentTransportModels.C
wmkdepend: parse error while scanning 'tf_utils.H' ... perhaps missing a final newline
wmkdepend: parse error while scanning 'maketurbulentTransportModels.C' ... perhaps missing a final newline

However, I managed to get the ML_SA_CG.so file in $FOAM_USER_LIBBIN
Is this which could be causing the error? Any help/suggestions ?

from tensorflowfoam.

Romit-Maulik avatar Romit-Maulik commented on May 18, 2024

Yes - this looks like a version issue - are you still trying this on OpenFOAM v 1906?

from tensorflowfoam.

chandukec avatar chandukec commented on May 18, 2024

Yes, I am using OF v 1906, but if I remember correctly then I managed to work this utility perfectly using your help in #6
but I am not sure what had changed-- an only thing which I noticed had changed is the Ubuntu version from 18 to 20.

from tensorflowfoam.

chandukec avatar chandukec commented on May 18, 2024

To start afresh, I am trying to re-install this utility. In step 2 of README.md inside TensorFlowFoam-master/ML_RANS, when I am trying to wmake I am getting the following error:

Making dependency list for source file tf_utils.C
wmkdepend: parse error while scanning 'tf_utils.H' ... perhaps missing a final newline
wmkdepend: parse error while scanning 'tf_utils.C' ... perhaps missing a final newline
Making dependency list for source file maketurbulentTransportModels.C
wmkdepend: parse error while scanning 'tf_utils.H' ... perhaps missing a final newline
wmkdepend: parse error while scanning 'maketurbulentTransportModels.C' ... perhaps missing a final newline

Could you kindly help in this regard?

from tensorflowfoam.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.