frankhan91 / DeepBSDE

Deep BSDE solver in TensorFlow
MIT License
259 stars 129 forks source link

Question about the solver.py #5

Closed Field97 closed 2 years ago

Field97 commented 2 years ago

Hi, Mr. Han! In the file, solver.py, I wonder why subnets are denoted by z = self.subnet[t](x[:, :, t + 1], training) / self.bsde.dim rather than z = self.subnet[t](x[:, :, t + 1], training) (the code is in the NonsharedModel class).

frankhan91 commented 2 years ago

Both options are fine in general. They are mathematically equivalent and give similar results in low dimensions. Here I scaled the z component by a factor 1/d mainly to avoid too large output from the term z * dw in the initial period of training when d is large (~100).

Field97 commented 2 years ago

Very clear answer! Thanks for the reply.