如何保存和还原深度学习模型?

时间:2019-06-07 08:03:55

标签: python tensorflow deep-learning

我是Tensorflow的新手。我已经使用Tensoflow线性回归器训练了模型。现在,我想保存模型并将其加载到另一个可以执行预测的python脚本中。

input_func = tf.estimator.inputs.pandas_input_fn(x = X_train , y = y_train , batch_size = 100 , num_epochs = None , 
                                                shuffle = True)

model = tf.estimator.LinearRegressor(feature_columns = input_columns)

model.train(input_fn = input_func , steps = 3000)

0 个答案:

没有答案