Skip to content

Commit

Permalink
add many mock import
Browse files Browse the repository at this point in the history
  • Loading branch information
KindXiaoming committed Apr 29, 2024
1 parent 718742a commit 87e22e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 8 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ def skip(app, what, name, obj, would_skip, options):
def setup(app):
app.connect("autodoc-skip-member", skip)

autodoc_mock_imports = ["numpy"]
autodoc_mock_imports = ["numpy",
"torch",
"torch.nn",
"matplotlib.pyplot",
"tqdm",
"sympy",
"sklearn.linear_model",
"torch.optim"]


source_suffix = [".rst", ".md"]
Expand Down
3 changes: 1 addition & 2 deletions kan/KANLayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import torch.nn as nn
import numpy as np
from .spline import *
import inspect


class KANLayer(nn.Module):
Expand Down Expand Up @@ -367,4 +366,4 @@ def unlock(self, ids):
self.lock_id[ids[i][1]*self.in_dim+ids[i][0]] = 0
self.lock_counter -= 1



0 comments on commit 87e22e6

Please sign in to comment.