提交 5696b870 编写于 作者: W wuzewu

update demo

上级 f4b8b6ab
name: Resnet50
type: CV/classification
author: paddlepaddle
author-email: paddle-dev@baidu.com
author_email: paddle-dev@baidu.com
summary: "Resnet50 is a model used to image classfication, we trained this model on ImageNet-2012 dataset."
version: 1.0.0
......@@ -15,7 +15,7 @@ def train():
img = input_dict[0]
feature_map = output_dict[0]
config = hub.FinetuneConfig(
config = hub.RunConfig(
use_cuda=True,
num_epoch=10,
batch_size=32,
......
......@@ -2,4 +2,5 @@ name: lac
type: nlp/lexical_analysis
author: paddlepaddle
author_email: paddle-dev@baidu.com
summary: "'Lexical Analysis of Chinese', which abbreviated as LAC, is a model used to process lexical analysis. People can use LAC to process Chinese text segmentation, part-of-speech tagging and named entity recognition"
version: 1.0.0
......@@ -52,14 +52,14 @@ class Processor(hub.BaseProcessor):
def preprocess(self, sign_name, data_dict):
result = {'text': []}
processed = self.lac.segment(data=data_dict)
processed = self.lac.lexical_analysis(data=data_dict)
unk_id = len(self.word_dict)
for index, data in enumerate(processed):
result_i = {'processed': []}
result_i['origin'] = data_dict['text'][index]
for result_dict in data:
if result_dict['word'] in self.word_dict:
_index = self.word_dict[result_dict['word']]
for word in data['word']:
if word in self.word_dict:
_index = self.word_dict[word]
else:
_index = unk_id
result_i['processed'].append(_index)
......
name: senta
type: nlp/sentiment_analysis
author: paddlepaddle
author-email: paddle-dev@baidu.com
author_email: paddle-dev@baidu.com
summary: "Senta is a model used to analyse sentiment tendency of Chinese sentences. We divide sentiment tendencies into three levels, score 2 means positive, score 1 means neuter, and score 0 means negative"
version: 1.0.0
......@@ -2,4 +2,5 @@ name: ssd_mobilenet_v1_pascalvoc
type: CV/object-detection
author: paddlepaddle
author_email: paddle-dev@baidu.com
summary: "SSD(Single Shot MultiBox Detector) is a object detection model use to detect target category and location in a image picture. This model is trained with PASCAL VOC dataset, and therefore provides 20 categories of recognition capability, which mentioned below : aeroplane,bicycle,bird,boat,bottle,bus,car,cat,chair,cow,diningtable,dog,horse,motorbike,person,pottedplant,sheep,sofa,train,tvmonitor"
version: 1.0.0
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册