Skip to content

Commit da471cc

Browse files
committed
Pass shape
1 parent 9165b5c commit da471cc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tests/test_kerasga.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_kerasga_evolution():
1010
data_inputs = numpy.array([[0, 0], [0, 1], [1, 0], [1, 1]])
1111
data_outputs = numpy.array([[1, 0], [0, 1], [0, 1], [1, 0]]) # One-hot encoded
1212

13-
input_layer = tensorflow.keras.layers.Input(2)
13+
input_layer = tensorflow.keras.layers.Input(shape=(2,))
1414
dense_layer = tensorflow.keras.layers.Dense(4, activation="relu")(input_layer)
1515
output_layer = tensorflow.keras.layers.Dense(2, activation="softmax")(dense_layer)
1616

tests/test_torchga.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pygad
2+
import pygad.torchga
23
import torch
34

45
def test_torchga_evolution():

0 commit comments

Comments
 (0)