Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

请教关于训练数据的归一化问题

Open cdliheng opened this issue 8 years ago • 0 comments

官方自带的“基本使用概念”里面有个线性回归的例子,使用的训练数据集是自己传入的。 我把数据值修改大了,比如[5061,245],就会报“The kernel appears to have died. It will restart automatically.”错误。请问该如何解决呢?谢谢。 附上代码:

define training dataset reader

def train_reader(): train_x = np.array([[1, 1], [1, 2], [3, 4], [5, 2]]) train_y = np.array([[-2], [-3], [-7], [-7]])

def reader():
    for i in xrange(train_y.shape[0]):
        yield train_x[i], train_y[i]

return reader

cdliheng avatar Feb 16 '18 11:02 cdliheng