katiana22 / tl-deeponet Goto Github PK
View Code? Open in Web Editor NEWSource code of 'Deep transfer operator learning for partial differential equations under conditional shift'.
License: MIT License
Source code of 'Deep transfer operator learning for partial differential equations under conditional shift'.
License: MIT License
I was trying to run TL1/source_model.py but I met an error at this line:
Line 71 in 45d0cdb
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:
TL-DeepONet/data_generation/Darcy_geometry/Darcy_square.m
Lines 57 to 69 in 45d0cdb
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.
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...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.