paulpuren / phycrnet Goto Github PK
View Code? Open in Web Editor NEWPhysics-informed convolutional-recurrent neural networks for solving spatiotemporal PDEs
License: MIT License
Physics-informed convolutional-recurrent neural networks for solving spatiotemporal PDEs
License: MIT License
At the begining of train
function, the model is uploaded but there is no model,
model, optimizer, scheduler = load_checkpoint(model, optimizer, scheduler, pre_model_save_path)
I commented this line to enforce the code to generate a new model but I got this error,
`--------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/tmp/ipykernel_28511/1822465240.py in
13 start = time.time()
14 train_loss = train(model, input, initial_state, n_iters_adam, time_batch_size,
---> 15 lr_adam, dt, dx, model_save_path, pre_model_save_path, num_time_batch)
16 end = time.time()
17
/tmp/ipykernel_28511/4188446759.py in train(model, input, initial_state, n_iters, time_batch_size, learning_rate, dt, dx, save_path, pre_model_save_path, num_time_batch)
35
36 # output is a list
---> 37 output, second_last_state = model(hidden_state, u0)
38
39 # [t, c, height (Y), width (X)]
~/anaconda3/envs/twoPhase/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
725 result = self._slow_forward(*input, **kwargs)
726 else:
--> 727 result = self.forward(*input, **kwargs)
728 for hook in itertools.chain(
729 _global_forward_hooks.values(),
/tmp/ipykernel_28511/1566267331.py in forward(self, initial_state, x)
85 # one-step forward
86 (h, c) = internal_state[i - self.num_encoder]
---> 87 x, new_c = getattr(self, name)(x, h, c)
88 internal_state[i - self.num_encoder] = (x, new_c)
89
~/anaconda3/envs/twoPhase/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
725 result = self._slow_forward(*input, **kwargs)
726 else:
--> 727 result = self.forward(*input, **kwargs)
728 for hook in itertools.chain(
729 _global_forward_hooks.values(),
/tmp/ipykernel_28511/3951104009.py in forward(self, x, h, c)
56 def forward(self, x, h, c):
57
---> 58 ci = torch.sigmoid(self.Wxi(x) + self.Whi(h))
59 cf = torch.sigmoid(self.Wxf(x) + self.Whf(h))
60 cc = cf * c + ci * torch.tanh(self.Wxc(x) + self.Whc(h))
RuntimeError: The size of tensor a (32) must match the size of tensor b (16) at non-singleton dimension 3`
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.