Skip to content

Commit 1c3245e

Browse files
RobAltenatreo
authored andcommitted
remove compiler warnings.
Signed-off-by: Robert Altena <[email protected]>
1 parent 2fa23a1 commit 1c3245e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rl4j-cartpole-examples/src/main/java/Cartpole.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.deeplearning4j.rl4j.space.Box;
2323
import org.nd4j.linalg.learning.config.Adam;
2424

25-
import java.io.IOException;
2625
import java.util.logging.Logger;
2726

2827
/**
@@ -53,12 +52,12 @@ public class Cartpole
5352
DQNFactoryStdDense.Configuration.builder()
5453
.l2(0.001).updater(new Adam(0.0005)).numHiddenNodes(16).numLayer(3).build();
5554

56-
public static void main(String[] args) throws IOException {
55+
public static void main(String[] args) {
5756
DQNPolicy<Box> pol = cartPole();
5857
loadCartpole(pol);
5958
}
6059

61-
private static DQNPolicy<Box> cartPole() throws IOException {
60+
private static DQNPolicy<Box> cartPole() {
6261
//define the mdp from gym (name, render)
6362
GymEnv<Box, Integer, org.deeplearning4j.rl4j.space.DiscreteSpace> mdp = new GymEnv<Box, Integer, org.deeplearning4j.rl4j.space.DiscreteSpace>("CartPole-v0", false, false);
6463
QLearningDiscreteDense<Box> dql = new QLearningDiscreteDense<Box>(mdp, CARTPOLE_NET, CARTPOLE_QL);
@@ -69,7 +68,7 @@ private static DQNPolicy<Box> cartPole() throws IOException {
6968
return dql.getPolicy(); //get the final policy
7069
}
7170

72-
private static void loadCartpole(DQNPolicy<Box> pol) throws IOException {
71+
private static void loadCartpole(DQNPolicy<Box> pol) {
7372
//use the trained agent on a new similar mdp (but render it this time)
7473

7574
//define the mdp from gym (name, render)

0 commit comments

Comments
 (0)