edgellm / pinn-pytorch Goto Github PK
View Code? Open in Web Editor NEWDeep learning library for solving differential equations on top of PyTorch.
Deep learning library for solving differential equations on top of PyTorch.
When executing Burger 2D.ipynb
I get the following error:
model.train()
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Input In [5], in <cell line: 1>()
----> 1 model.train()
File ~/code/pinn-pytorch/grad/pytorchPDE.py:111, in PytorchPDE.train(self, epochs, save_step, update_step, upload)
107 self.optimizer.zero_grad()
109 # forward + backward + optimize
--> 111 loss = self.loss()
113 # if(upload):
114 # neptune.log_metric('loss', loss.item())
116 loss.backward()
File ~/code/pinn-pytorch/grad/pytorchPDE.py:56, in PytorchPDE.loss(self)
48 second_grads = None
50 # print('train_tag_min: ', self.train_tag[:,-1].min())
51 # print('train_tag_max: ', self.train_tag[:,-1].max())
52 # print('predicts_min: ', predicts.min())
53 # print('first_grads_min: ', first_grads.min())
54 # print('second_grads_min: ', second_grads[0].min(), second_grads[0].min())
---> 56 domain_loss = self.pde(train_points, predicts, first_grads, second_grads)*self.train_tag[:,-1]
57 boundary_loss = 0
58 for i, bc in enumerate(self.data.bcs):
Input In [4], in pde(x, y, first_grads, second_grads)
1 def pde(x,y,first_grads,second_grads):
2 # print(second_grads)
----> 3 return first_grads[:,0] + y[:,0]*first_grads[:,1] - (0.01/np.pi)*second_grads[1][:,1]
IndexError: tuple index out of range
Package versions:
python=3.9.12
torch=1.11.0
Hi,
Thank you for this repository. Are you planning to add Navier-Stokes solver to the repository?
Baris.
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.