Skip to content

Commit ee27d98

Browse files
committed
update doc for mini batch
1 parent 51794b7 commit ee27d98

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/advanced.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ Mini-batch
1010

1111
PINNICLE supports mini-batch training when using the ``pytorch`` backend. In the current implementation, mini-batches are resampled at every epoch to enhance convergence stability.
1212
To activate mini-batch training, simply add the following setting to the hyperparameter dictionary. PINNICLE will automatically generate mini-batches from the data specified in ``hp["data"]``.
13+
And in the data section, you can set the ``"data_size"`` to a large number or simply ``"MAX"``, to cover a large amount of your data.
1314

1415
.. code-block:: python
1516
17+
hp_local["data"] = {"ISSM": {"data_size": {"u":100, "v":"MAX", "s":100, "H":10, "C":None}}}
1618
hp["mini_batch"] = mini_batch
1719
1820
- Avoid setting ``mini_batch`` too large, as this can lead to inefficiencies and excessive memory usage.

tests/test_pinn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def test_only_callbacks(tmp_path):
277277
hp_local = dict(hp)
278278
hp_local["save_path"] = str(tmp_path)
279279
hp_local["num_collocation_points"] = 100
280-
issm["data_size"] = {"u":100, "v":100, "s":100, "H":10, "C":None, "vel":100}
280+
issm["data_size"] = {"u":100, "v":"MAX", "s":100, "H":10, "C":None, "vel":100}
281281
hp_local["data"] = {"ISSM": issm}
282282
hp_local["min_delta"] = 1e10
283283
hp_local["period"] = 5

0 commit comments

Comments
 (0)