Git Product home page Git Product logo

phycnn's People

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  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

phycnn's Issues

想請問是否有更新到可以支援tensorflow2.0以上版本

您好,目前在做相關領域的研究,有閱讀過您的論文,非常厲害,本人也非常感興趣,本身是土木工程專業的,想請問您是否有嘗試用tensorflow2.0以上版本去運作,因為自己有嘗試過但是有很多地方有小錯誤,如果您有tensorflow2.0以上版本可以分享的話方便釋出供參考嗎?非常感謝,祝您一切順利!

saving and restoring the model

Hi,

I added these two functions in the model class to save and load the models. It saves the files, but when we load the model, it is not loading the correct weights.

def save_NN(self, model_name):
    saver = tf.train.Saver()
    save_path = saver.save(self.sess, model_name)
    print("Model saved in path: %s" % save_path)
def load_NN(self, model_name):
    saver = tf.train.Saver()
    saver.restore(self.sess, model_name)
    print("Model restored.")

Code for training:

# with tf.device('/device:GPU:1'):
with tf.device('/cpu:0'):

    config = tf.ConfigProto()
    config.gpu_options.allow_growth = True
    # config.gpu_options.per_process_gpu_memory_fraction = 0.4
    session = tf.Session(config=config)
    # tf.Session(config=tf.ConfigProto(log_device_placement=True))

    # Training
    model = DeepPhyLSTM(eta_tt_train, ag_train, Phi_t)

    Loss = model.train(num_epochs=200, batch_size=N_train, learning_rate=1e-3, bfgs=1)
    model.save_NN('./model_dir/model_name')

Code for loading:

with tf.device('/cpu:0'):

    config = tf.ConfigProto()
    config.gpu_options.allow_growth = True
    # config.gpu_options.per_process_gpu_memory_fraction = 0.4
    session = tf.Session(config=config)
    # tf.Session(config=tf.ConfigProto(log_device_placement=True))

    # Training
    model2 = DeepPhyLSTM(eta_tt_train, ag_train, Phi_t)
    model2.load_NN('./model_dir_5')

Thus, we are not able to reproduce the results directly(Right now, we have to train the model every time we want to use it).

Can you please let us know how to save and load the models correctly?

Why the shape of the prediction is a 3 dimensional

Thank you for sharing your code. I noticed that the output of the prediction is 3d dimensional and you describe in the code to use dof = 0. I understand that this problem is just analyzed in the lateral direction. Are there more dofs?

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.