Git Product home page Git Product logo

tl-deeponet's Issues

Reshape error

I was trying to run TL1/source_model.py but I met an error at this line:

u_train_mean = np.mean(np.reshape(u_train, (-1, r)), 0)

The error says:

Exception has occurred: ValueError
cannot reshape array of size 20000000 into shape (1541)
  File "~/TL-DeepONet/TL1/dataset.py", line 71, in load_data
    u_train_mean = np.mean(np.reshape(u_train, (-1, r)), 0)
  File "~/TL-DeepONet/TL1/dataset.py", line 17, in __init__
    self.X, self.u_mean, self.u_std = self.load_data()
  File "~/TL-DeepONet/TL1/source_model.py", line 74, in main
    data = DataSet(bs)
  File "~/TL-DeepONet/TL1/source_model.py", line 227, in <module>
    main()
ValueError: cannot reshape array of size 20000000 into shape (1541)

This is because u_train has shape (2000, 100, 100), but I guess it's supposed to be (2000, 1541), where 1541 is the number of output sensors.

The data I used is generated here:

sol = interpolateSolution(results, xx, yy);
ut = reshape(sol, size(xx));
% figure;
% scatter(xx,yy,[],ut)
% imagesc(ut); colormap(jet); axis equal;
u(i,:,:) = ut;
% pdeplot(model,'XYData',results.NodalSolution); colormap(jet); axis equal;
end
u_train = u(1:2000,:,:);

where it seems indeed is interpolating the unknown functions at 100 x 100 grid.

Problems encountered during environment configuration

Your repository I am working with utilizes TensorFlow 1.15 with the CPU version. However, I would like to configure the environment to run TensorFlow on GPU. I am encountering difficulties in setting up the environment to enable GPU acceleration for TensorFlow 1.15. The 3090 GPU was abandoned by me because it does not support versions below cuda11.0. And I attempted to configure this environment on a TITAN V GPU using cuda 10.0 and cudnn 7.4.2, based on the information provided on the TensorFlow official website. Even though tf.test.is_gpu_available() returned true, I still could not run your code correctly. Besides, I tried rewriting your code using PyTorch, but the test results on the TL7 source dataset differed significantly from the results in your paper. (2.12% in my experiment; 1.51% in your paper) If you could help me solve this problem, or provide the code for the GPU version, I would be very grateful.

About exp in test.m

The test.m in your respository gives a exp operation to K_field, and in the dataset you give a np.log to conteract exp, does this have specific reason? I did not notice this and have generated some labels use the exp K_field...

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.