训练出core
Created by: RuijieHou
I0918 19:15:18.984148 5404 Util.cpp:166] commandline: --use_gpu=False
I0918 19:15:18.989181 5404 GradientMachine.cpp:85] Initing parameters..
I0918 19:15:18.989519 5404 GradientMachine.cpp:92] Init parameters done.
Thread [139932974356224] Forwarding __mse_cost_0__,
*** Aborted at 1505733318 (unix time) try "date -d @1505733318" if you are using GNU date ***
PC: @ 0x0 (unknown)
*** SIGSEGV (@0x29) received by PID 5404 (TID 0x7f44af3a9700) from PID 41; stack trace: ***
@ 0x7f44aef80160 (unknown)
@ 0x7f44aa02cb12 paddle::CpuMatrix::sumOfSquares()
@ 0x7f44a9e89b65 paddle::CostLayer::forward()
@ 0x7f44a9f3e9d0 paddle::NeuralNetwork::forward()
@ 0x7f44a9f1b0f3 paddle::GradientMachine::forwardBackward()
@ 0x7f44aa0b2b7b GradientMachine::forwardBackward()
@ 0x7f44a9daf76e _wrap_GradientMachine_forwardBackward
@ 0x4a9e33 PyEval_EvalFrameEx
@ 0x4ad70d PyEval_EvalCodeEx
@ 0x4aa88c PyEval_EvalFrameEx
@ 0x4ad70d PyEval_EvalCodeEx
@ 0x4aa88c PyEval_EvalFrameEx
@ 0x4ad70d PyEval_EvalCodeEx
@ 0x4aa88c PyEval_EvalFrameEx
@ 0x4ad70d PyEval_EvalCodeEx
@ 0x4ad842 PyEval_EvalCode
@ 0x4d64c2 PyRun_FileExFlags
@ 0x4d7839 PyRun_SimpleFileExFlags
@ 0x416edd Py_Main
@ 0x7f44ae4dabd5 __libc_start_main
@ 0x415f91 (unknown)
@ 0x0 (unknown)
Segmentation fault (core dumped)
input: 16796910092836471487 1 0 0:-0.0980023 1:-0.0508415 2:-0.313378 3:-0.331837...
x = paddle.layer.data(name='x', type=paddle.data_type.dense_vector(3660))
y_predict = paddle.layer.fc(input=x, size=1, act=paddle.activation.Linear())
y = paddle.layer.data(name='y', type=paddle.data_type.integer_value(1))
# define training dataset reader
def train_reader(train_list):
def reader():
with open(train_list, 'r') as f:
for line in f:
items = line.strip().split('\t')[0].split(' ')
fea = []
for item in items[3:]:
fea.append(float(item.split(':')[1]))
yield fea, int(items[1])
return reader