# How to predict new value corresponding to a new initial condition when using NeuralPDE

**URL:** https://discourse.julialang.org/t/how-to-predict-new-value-corresponding-to-a-new-initial-condition-when-using-neuralpde/101224
**Category:** General Usage
**Tags:** question, neural-network
**Created:** [July 5, 2023, 6:40pm UTC](https://discourse.julialang.org/t/how-to-predict-new-value-corresponding-to-a-new-initial-condition-when-using-neuralpde/101224 "2023-07-05T18:40:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ethan\_Tran](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ethan_tran/32/49198_2.png) [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)
#### Post date: [July 5, 2023, 6:40pm UTC](https://discourse.julialang.org/t/how-to-predict-new-value-corresponding-to-a-new-initial-condition-when-using-neuralpde/101224/1 "2023-07-05T18:40:05Z")

</div>

After using NeuralPDE to solve the ODEs system, I got the prediction for a specific system as a result of the training process by using the code in the tutorial below:

```julia
ts = 0.0:0.01:10.0
minimizers_ = [res.u.depvar[sym_prob.depvars[i]] for i in 1:2]
u_predict = [[phi[i]([t],minimizers_[i])[1] for t in ts] for i in 1:2]

```

Please help me with how could I change the input (when changing the initial conditions) and use the training weights to predict a new value.

---

<div class="post-metadata">

### Author: ![Astitva\_Aggarwal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/astitva_aggarwal/32/47067_2.png) [@Astitva\_Aggarwal](https://discourse.julialang.org/u/Astitva_Aggarwal)
#### Post date: [September 25, 2023, 1:42pm UTC](https://discourse.julialang.org/t/how-to-predict-new-value-corresponding-to-a-new-initial-condition-when-using-neuralpde/101224/2 "2023-09-25T13:42:19Z")

</div>

Hi @Ethan_Tran, run your code with the new problem which uses the new initial conditions when specifying the ODE system, and use the new results(trained parameters) for predicting over your testing domain. I could help more if you tell me what problem are you working with, and what new initial conditions are you exactly talking about.
