GithubHelp home page GithubHelp logo

pswpswpsw / nif Goto Github PK

View Code? Open in Web Editor NEW
51.0 4.0 8.0 84.5 MB

A library for dimensionality reduction on spatial-temporal PDE

Home Page: https://pswpswpsw.github.io/nif

License: GNU Lesser General Public License v2.1

Python 0.23% Jupyter Notebook 99.77%
deep-learning dimensionality-reduction pde reduced-order-modeling tensorflow

nif's People

Contributors

pswpswpsw avatar yafshar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nif's Issues

Tensorflow version

Hi.

Seemingly tensorflow is missing from the requirements.txt file.
I installed tensorflow==2.10.1 and the importing worked.

Thanks.

Cannot save NIFMultiScale model

Attempting to save a NIFMultiScale model (or its subclasses) using model.save() or tf.saved_model.save() throws an error as below:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/folders/dp/zr6n3k1d2lv5b2t917gfqlnm0000gn/T/ipykernel_83723/2345140346.py in <module>
----> 1 model.save('tut_2_model_multiscale')

~/miniconda3/envs/nif/lib/python3.10/site-packages/keras/utils/traceback_utils.py in error_handler(*args, **kwargs)
     68             # To get the full stack trace, call:
     69             # `tf.debugging.disable_traceback_filtering()`
---> 70             raise e.with_traceback(filtered_tb) from None
     71         finally:
     72             del filtered_tb

~/miniconda3/envs/nif/lib/python3.10/site-packages/google/protobuf/internal/python_message.py in field_setter(self, new_value)
    702       new_value = type_checker.CheckValue(new_value)
    703     except TypeError as e:
--> 704       raise TypeError(
    705           'Cannot set %s to %.1024r: %s' % (field.full_name, new_value, e))
    706     if clear_when_set_to_default and not new_value:

TypeError: Cannot set tensorflow.SavedVariable.trainable to 'float32': 'float32' has type <class 'str'>, but expected one of: (<class 'bool'>, <class 'numbers.Integral'>)

This originates in HyperLinearForSIREN.__init__ where self.w and self.b are defined as tf.Variables: mixed_policy.variable_dtype is given for a positional argument that belongs to Variable's training argument. This issue is resolved by replacing these lines with dtype=mixed_policy.variable_dtype. I have a branch that implements this change that I can push if desired.

Although this fixes the problem with tf.saved_model.save(), using model.save() still throws other errors once this is resolved. It's unclear if these problems are with NIF or with a Tensorflow bug (this issue).

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.