2017-12-19 21 views
0

내가 모델을 저장하고 tflearn 라이브러리와 다른 프로세스에서로드하려고 다른 과정에서 훈련 모델 ... 부하 tflearn

그래서 내가 모델 생성 :

lenx = 21908 
leny = 81 
# Build neural network 
net = tflearn.input_data(shape=[None, lenx]) 
net = tflearn.fully_connected(net, 8) 
net = tflearn.fully_connected(net, 8) 
net = tflearn.fully_connected(net, leny, activation='softmax') 
net = tflearn.regression(net) 

# Define model and setup tensorboard 
model = tflearn.DNN(net, tensorboard_dir='tflearn_logs') 
# Start training (apply gradient descent algorithm) 
model.fit(train_x, train_y, n_epoch=10, batch_size=8, show_metric=True) 
model.save('model.tflearn') 

작동 승인!

lenx = 21908 
leny = 81 
# Build neural network 
net = tflearn.input_data(shape=[None, lenx]) 
net = tflearn.fully_connected(net, 8) 
net = tflearn.fully_connected(net, 8) 
net = tflearn.fully_connected(net, leny, activation='softmax') 
net = tflearn.regression(net) 

model = tflearn.DNN(net, tensorboard_dir='tflearn_logs') 

model.load("model.tflearn") 

을하지만이 오류가있어 : 다음 다른 파일에, 이런 식으로, 내가 그것을로드하려고하고 다른 프로세스에서 실행하는 나는 많은 것들을 시도

ValueError: Cannot feed value of shape (1, 0) for Tensor 'InputData/X:0', which has shape '(?, 21908)' 

를하지만 않습니다 작동하지.

model.load("model.tflearn", weights_only=True) 
+0

안녕하세요이 대한 답변을 얻을 않았다 –

답변

0

나는 당신이 놓치고있는 것은 부하에 "weights_only = TRUE"인수 생각?
+0

고맙지 만 작동하지 않습니다. –