- 使用网络直接得到预测的分数
(1)准备数据
samples 10 * 10
create table hs_tmp_65 as select * from hs_tmp_54 limit 10;
create table hs_tmp_66 as select * from hs_tmp_55 limit 10;
(2)inference
pai -name tensorflow140 -Dscript="file:///home/hengsong/origin_deep_cluster_odps_8.tar.gz" -DentryFile="inference_v4.py" -Dcluster='{"worker":{"count":10, "cpu":200, "memory":4000}, "ps":{"count":3, "cpu":200, "memory":5000}}' -Dtables="odps://graph_embedding/tables/hs_tmp_54" -Doutputs="odps://graph_embedding/tables/hs_tmp_56" -DcheckpointDir="oss://bucket-automl/hengsong/?role_arn=acs:ram::1293303983251548:role/graph2018&host=cn-hangzhou.oss-internal.aliyun-inc.com" -DuserDefinedParameters="--learning_rate=3e-4 --batch_size=1024 --is_save_model=True --attention_type=1 --num_epochs=100 --ckpt=hs_ugc_video.ckpt-1" -DuseSparseClusterSchema=True;
- tmp
add table graph_embedding.hs_tmp_65 as hs_for_udtf_1;
add py /home/hengsong/query_co_video/src/hs_udtf_06.py;
CREATE FUNCTION hs_get_inferences_06 AS hs_udtf_06.Processor USING hs_udtf_06.py;
create table hs_tmp_67 as select hs_get_inferences_06(id, words_mainse_ws) as (video_id, query_id, query_ws) from hs_tmp_66;
drop table hs_tmp_68;
yes
create table hs_tmp_68 as
select b.words_mainse_ws as video_ws, a.* from
(select * from hs_tmp_67)a join (select * from hs_tmp_66)b on a.video_id == b.id;
| video_ws | video_id | query_id | query_ws |
网友评论