From 5ea72c18930a2f89ab208cd62c0230c743d2de00 Mon Sep 17 00:00:00 2001 From: barrierye Date: Fri, 17 Jul 2020 11:25:47 +0800 Subject: [PATCH] remove main func in Client.java --- .../java/io/paddle/serving/client/Client.java | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/java/src/main/java/io/paddle/serving/client/Client.java b/java/src/main/java/io/paddle/serving/client/Client.java index 27a6fffe..3ebd390b 100644 --- a/java/src/main/java/io/paddle/serving/client/Client.java +++ b/java/src/main/java/io/paddle/serving/client/Client.java @@ -467,32 +467,4 @@ public class Client { ); return predict_future; } - - public static void main( String[] args ) { - // DL4J(Deep Learning for Java)Document: - // https://www.bookstack.cn/read/deeplearning4j/bcb48e8eeb38b0c6.md - - float[] data = {0.0137f, -0.1136f, 0.2553f, -0.0692f, - 0.0582f, -0.0727f, -0.1583f, -0.0584f, - 0.6283f, 0.4919f, 0.1856f, 0.0795f, -0.0332f}; - INDArray npdata = Nd4j.createFromArray(data); - HashMap feed_data - = new HashMap() {{ - put("x", npdata); - }}; - List fetch = Arrays.asList("price"); - - Client client = new Client(); - String endpoint = "localhost:9393"; - boolean succ = client.connect(endpoint); - if (succ != true) { - System.out.println("connect failed."); - return; - } - - Map fetch_map = client.predict(feed_data, fetch); - for (Map.Entry e : fetch_map.entrySet()) { - System.out.println("Key = " + e.getKey() + ", Value = " + e.getValue()); - } - } } -- GitLab