Skip to content

Commit 7519436

Browse files
committed
Remove the test of int arguments for those classes changed to TFloating type, as they would no longer compile.
1 parent ef29af9 commit 7519436

File tree

10 files changed

+5
-150
lines changed

10 files changed

+5
-150
lines changed

tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ELUTest.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,7 @@ public void setUp() {}
4343
@AfterEach
4444
public void tearDown() {}
4545

46-
/** Test of ELU call method */
47-
@Test
48-
public void testCallInt() {
49-
for (TestSession.Mode tfMode : tfModes)
50-
assertThrows(
51-
java.lang.IllegalArgumentException.class,
52-
() -> {
53-
try (TestSession session = TestSession.createTestSession(tfMode)) {
54-
Ops tf = session.getTF();
55-
Operand<TInt32> input = tf.constant(new int[] {1, 2, 3, 4, 5});
56-
ELU<TInt32> instance = new ELU<>(tf);
57-
Operand<TInt32> result = instance.call(input);
58-
}
59-
});
60-
}
46+
6147

6248
/** Test of ELU call method */
6349
@Test

tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ExponentialTest.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,7 @@ public void setUp() {}
4242
@AfterEach
4343
public void tearDown() {}
4444

45-
/** Test of Exponential call method. */
46-
@Test
47-
public void testCallInt() {
48-
int[] input = {1, -2, 3, -4, -1, 2, -3, 4};
49-
for (TestSession.Mode tfMode : tfModes)
50-
assertThrows(
51-
IllegalArgumentException.class,
52-
() -> {
53-
try (TestSession session = TestSession.createTestSession(tfMode)) {
54-
Ops tf = session.getTF();
55-
Exponential<TInt32> instance = new Exponential<>(tf);
56-
Operand<TInt32> result = instance.call(tf.constant(input));
57-
}
58-
});
59-
}
45+
6046

6147
/** Test of Exponential call method. */
6248
@Test

tensorflow-framework/src/test/java/org/tensorflow/framework/activations/HardSigmoidTest.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,7 @@ public void setUp() {}
4242
@AfterEach
4343
public void tearDown() {}
4444

45-
/** Test of HardSigmoid call method. */
46-
@Test
47-
public void testCallInt() {
48-
int[] input = {1, -2, 3, -4, -1, 2, -3, 4};
4945

50-
for (TestSession.Mode tfMode : tfModes)
51-
assertThrows(
52-
java.lang.IllegalArgumentException.class,
53-
() -> {
54-
try (TestSession session = TestSession.createTestSession(tfMode)) {
55-
Ops tf = session.getTF();
56-
HardSigmoid<TInt32> instance = new HardSigmoid<>(tf);
57-
Operand<TInt32> result = instance.call(tf.constant(input));
58-
}
59-
});
60-
}
6146

6247
/** Test of HardSigmoid call method. */
6348
@Test

tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ReLUTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void testCallFloat() {
5454

5555
/** Test of ReLU call method */
5656
@Test
57-
public void testCallint() {
57+
public void testCallInt() {
5858
int[][] input = {{1, -2}, {3, -4}, {-1, 2}, {-3, 4}};
5959
int[][] expected = {{1, 0}, {3, 0}, {0, 2}, {0, 4}};
6060
for (TestSession.Mode tfMode : tfModes)

tensorflow-framework/src/test/java/org/tensorflow/framework/activations/SELUTest.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,7 @@ public void setUp() {}
4242
@AfterEach
4343
public void tearDown() {}
4444

45-
/** Test of SELU call method */
46-
@Test
47-
public void testCallInt() {
48-
int[] input = {1, -2, 3, -4, -1, 2, -3, 4};
49-
for (TestSession.Mode tfMode : tfModes)
50-
assertThrows(
51-
java.lang.IllegalArgumentException.class,
52-
() -> {
53-
try (TestSession session = TestSession.createTestSession(tfMode)) {
54-
Ops tf = session.getTF();
55-
SELU<TInt32> instance = new SELU<>(tf);
56-
Operand<TInt32> result = instance.call(tf.constant(input));
57-
}
58-
});
59-
}
45+
6046

6147
/** Test of SELU call method */
6248
@Test

tensorflow-framework/src/test/java/org/tensorflow/framework/activations/SigmoidTest.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,6 @@ public void setUp() {}
4242
@AfterEach
4343
public void tearDown() {}
4444

45-
/** Test of Sigmoid call method */
46-
@Test
47-
public void testCallInt() {
48-
int[] input = {1, -2, 3, -4, -1, 2, -3, 4};
49-
for (TestSession.Mode tfMode : tfModes)
50-
assertThrows(
51-
java.lang.IllegalArgumentException.class,
52-
() -> {
53-
try (TestSession session = TestSession.createTestSession(tfMode)) {
54-
Ops tf = session.getTF();
55-
Sigmoid<TInt32> instance = new Sigmoid<>(tf);
56-
Operand<TInt32> result = instance.call(tf.constant(input));
57-
}
58-
});
59-
}
6045

6146
/** Test of Sigmoid call method */
6247
@Test

tensorflow-framework/src/test/java/org/tensorflow/framework/activations/SoftplusTest.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
import org.tensorflow.op.Ops;
2121
import org.tensorflow.types.TFloat32;
2222
import org.tensorflow.types.TFloat64;
23-
import org.tensorflow.types.TInt32;
24-
25-
import static org.junit.jupiter.api.Assertions.assertThrows;
2623

2724
/** @author Jim Clarke */
2825
public class SoftplusTest {
@@ -43,23 +40,6 @@ public void setUp() {}
4340
@AfterEach
4441
public void tearDown() {}
4542

46-
/** Test of Softplus call method */
47-
@Test
48-
public void testCallInt() {
49-
int[] input = {1, -2, 3, -4, -1, 2, -3, 4};
50-
51-
for (TestSession.Mode tfMode : tfModes)
52-
assertThrows(
53-
java.lang.IllegalArgumentException.class,
54-
() -> {
55-
try (TestSession session = TestSession.createTestSession(tfMode)) {
56-
Ops tf = session.getTF();
57-
Softplus<TInt32> instance = new Softplus<>(tf);
58-
Operand<TInt32> result = instance.call(tf.constant(input));
59-
}
60-
});
61-
}
62-
6343
/** Test of Softplus call method */
6444
@Test
6545
public void testCallFloat() {

tensorflow-framework/src/test/java/org/tensorflow/framework/activations/SoftsignTest.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
import org.tensorflow.op.Ops;
2121
import org.tensorflow.types.TFloat32;
2222
import org.tensorflow.types.TFloat64;
23-
import org.tensorflow.types.TInt32;
24-
25-
import static org.junit.jupiter.api.Assertions.assertThrows;
2623

2724
/** @author Jim Clarke */
2825
public class SoftsignTest {
@@ -43,22 +40,6 @@ public void setUp() {}
4340
@AfterEach
4441
public void tearDown() {}
4542

46-
/** Test of Softsign call method */
47-
@Test
48-
public void testCallInt() {
49-
int[] input = {1, -2, 3, -4, -1, 2, -3, 4};
50-
for (TestSession.Mode tfMode : tfModes)
51-
assertThrows(
52-
java.lang.IllegalArgumentException.class,
53-
() -> {
54-
try (TestSession session = TestSession.createTestSession(tfMode)) {
55-
Ops tf = session.getTF();
56-
Softsign<TInt32> instance = new Softsign<>(tf);
57-
Operand<TInt32> result = instance.call(tf.constant(input));
58-
}
59-
});
60-
}
61-
6243
/** Test of Softsign call method */
6344
@Test
6445
public void testCallFloat() {

tensorflow-framework/src/test/java/org/tensorflow/framework/activations/SwishTest.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,7 @@ public void setUp() {}
4242
@AfterEach
4343
public void tearDown() {}
4444

45-
/** Test of Swish call method */
46-
@Test
47-
public void testCallInt() {
48-
int[] input = {1, -2, 3, -4, -1, 2, -3, 4};
49-
for (TestSession.Mode tfMode : tfModes)
50-
assertThrows(
51-
java.lang.IllegalArgumentException.class,
52-
() -> {
53-
try (TestSession session = TestSession.createTestSession(tfMode)) {
54-
Ops tf = session.getTF();
55-
Swish<TInt32> instance = new Swish<>(tf);
56-
Operand<TInt32> result = instance.call(tf.constant(input));
57-
}
58-
});
59-
}
45+
6046

6147
/** Test of Swish call method */
6248
@Test

tensorflow-framework/src/test/java/org/tensorflow/framework/activations/TanhTest.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
import org.tensorflow.op.Ops;
2121
import org.tensorflow.types.TFloat32;
2222
import org.tensorflow.types.TFloat64;
23-
import org.tensorflow.types.TInt32;
24-
25-
import static org.junit.jupiter.api.Assertions.assertThrows;
2623

2724
/** @author Jim Clarke */
2825
public class TanhTest {
@@ -42,23 +39,6 @@ public void setUp() {}
4239
@AfterEach
4340
public void tearDown() {}
4441

45-
/** Test of Tanh call method. */
46-
@Test
47-
public void testCallInt() {
48-
int[] input = {1, -2, 3, -4, -1, 2, -3, 4};
49-
50-
for (TestSession.Mode tfMode : tfModes)
51-
assertThrows(
52-
java.lang.IllegalArgumentException.class,
53-
() -> {
54-
try (TestSession session = TestSession.createTestSession(tfMode)) {
55-
Ops tf = session.getTF();
56-
Tanh<TInt32> instance = new Tanh<>(tf);
57-
Operand<TInt32> result = instance.call(tf.constant(input));
58-
}
59-
});
60-
}
61-
6242
/** Test of Tanh call method. */
6343
@Test
6444
public void testCallFloat() {

0 commit comments

Comments
 (0)