提交 eb97dfbd 编写于 作者: G guru4elephant 提交者: dongdaxiang

add check feed and fetch value

上级 f4137508
...@@ -156,6 +156,9 @@ class Client(object): ...@@ -156,6 +156,9 @@ class Client(object):
key)) key))
def predict(self, feed=None, fetch=None): def predict(self, feed=None, fetch=None):
if feed is None or fetch is None:
raise ValueError("You should specify feed and fetch for prediction")
fetch_list = [] fetch_list = []
if isinstance(fetch, str): if isinstance(fetch, str):
fetch_list = [fetch] fetch_list = [fetch]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册