提交 0bf02fec 编写于 作者: Z Zeyu Chen

add comments

上级 cc92eb41
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
......@@ -257,11 +257,6 @@ def retrain_net(train_reader,
data = module.get_feed_var("words")
emb = module.get_fetch_var("emb")
# # data layer
# data = fluid.layers.data(
# name="words", shape=[1], dtype="int64", lod_level=1)
# # embedding layer
# emb = fluid.layers.embedding(input=data, size=[dict_dim, emb_dim])
# bow layer
bow = fluid.layers.sequence_pool(input=emb, pool_type='sum')
bow_tanh = fluid.layers.tanh(bow)
......
文件模式从 100644 更改为 100755
python sentiment_classify.py --train_data_path ./data/train_data/corpus.train --word_dict_path ./data/train.vocab --mode train --model_path ./models
python sentiment_classify.py --train_data_path ./data/train_data/corpus.train --word_dict_path ./data/train.vocab --mode train --model_path ./models
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
......@@ -38,6 +38,10 @@ def mkdir(path):
class Module(object):
"""
A module represents a
"""
def __init__(self, module_url=None, module_dir=None):
if module_url == None and module_dir == None:
raise Exception("Module:module_url and module_dir are None!")
......
......@@ -18,16 +18,19 @@ option optimize_for = LITE_RUNTIME;
package paddle_hub;
// Feed Variable Description
message FeedDesc {
string key = 1;
string var_name = 2;
};
// Fetch Variable Description
message FetchDesc {
string key = 1;
string var_name = 2;
};
// Module Variable
message ModuleVar {
repeated FetchDesc fetch_desc = 1;
repeated FeedDesc feed_desc = 2;
......@@ -43,9 +46,10 @@ message Parameter {
// containing a serialized protocol message of this type. The further contents
// of the directory depend on the storage format described by the message.
message ModuleDesc {
// PaddleHub module name
string name = 1; // PaddleHub module name
// signature to input description
// signature to module variable
map<string, ModuleVar> sign2var = 2;
bool return_numpy = 4;
......
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
......@@ -59,4 +59,5 @@ setup(
'Topic :: Software Development :: Libraries :: Python Modules',
],
license='Apache 2.0',
keywords=('paddlepaddle pretrained paddle-hub'), )
keywords=('paddlepaddle pretrained paddle-hub'),
)
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册