Skip to content

Commit

Permalink
extension deps sorted out
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-alt committed Apr 9, 2024
1 parent 086085d commit 09cfefb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ version = "1.0.1"
PackageExtensionCompat = "65ce6f38-6b18-4e1d-a461-8949797d7930"

[weakdeps]
CounterfactualExplanations = "2f13d31b-18db-44c1-bc43-ebaf2cff0be0"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
RCall = "6f49c342-dc21-5d91-9882-a32aef131414"

[extensions]
PyTorchModelExt = "PythonCall"
RTorchModelExt = "RCall"
PyTorchModelExt = ["PythonCall", "CounterfactualExplanations", "Flux"]
RTorchModelExt = ["RCall", "CounterfactualExplanations", "Flux"]

[compat]
Aqua = "0.8"
CounterfactualExplanations = "0.1.35, 1"
Flux = "0.14.15"
PackageExtensionCompat = "1"
PythonCall = "0.9.19"
RCall = "0.14.1"
Expand Down
14 changes: 14 additions & 0 deletions test/neural_network_class.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from torch import nn

class NeuralNetwork(nn.Module):
def __init__(self):
super().__init__()
self.model = nn.Sequential(
nn.Flatten(),
nn.Linear(2, 32),
nn.Sigmoid(),
nn.Linear(32, 4)
)

def forward(self, x):
return self.model(x)

0 comments on commit 09cfefb

Please sign in to comment.