brandonsj
brandonsj
train.py from __future__ import print_function import sys import pickle import paddle import paddle.fluid as fluid import paddle.v2 import reader import os import math import numpy as np import time import...
reader.py import random import os import pickle import gzip class Dataset(object): def __init__(self, feature_dict_path='./thirdparty/feature_dic.pkl'): """构造函数 """ with open(feature_dict_path) as f: self.feature_dic = pickle.load(f) def list_file_path(self, dir_path): res = [] for...
hybrid_dssm.py from __future__ import print_function import paddle.fluid as fluid IS_SPARSE = True def get_target_combined_features(feature_dic_shape, hid_size, init_low_bound, init_high_bound): emb_target_features = [] # item_type a_item_type = fluid.layers.data(name='a_item_type', shape=[1], dtype='int64') a_item_type_emb = fluid.layers.embedding(...
This problem could be solved by using softmax_with_cross_entropy loss instead of cross_entropy. Thank you @SunGaofeng for your help.
paddlecloud team suggests me using asynchronous mode rather than synchronous mode. Does it help? Will it have any impact on the model accurateness?