Skip to content

Commit

Permalink
get Sphinx documentation to build pytorch NNCG optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
lululxvi committed Jan 4, 2025
1 parent 46e628e commit d99fa2f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions deepxde/optimizers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
import importlib
import os
import sys

from .config import LBFGS_options, set_LBFGS_options, NNCG_options, set_NNCG_options
from ..backend import backend_name


# To get Sphinx documentation to build, we import all
if os.environ.get("READTHEDOCS") == "True":
# The backend should be tensorflow/tensorflow.compat.v1 to ensure backend.tf is not
# None.
from . import jax
from . import paddle
from . import pytorch
from . import tensorflow
from . import tensorflow_compat_v1


def _load_backend(mod_name):
mod = importlib.import_module(".%s" % mod_name, __name__)
thismod = sys.modules[__name__]
Expand Down

0 comments on commit d99fa2f

Please sign in to comment.