tffm icon indicating copy to clipboard operation
tffm copied to clipboard

How can I verify the output of a row after loading the model into memory ?

Open akshit96 opened this issue 6 years ago • 1 comments

I want to manually verify the prediction of a particular testing sample.

akshit96 avatar May 10 '18 07:05 akshit96

you can use load_state function and set the number of features to use the model file. For example: model2 = TFFMClassifier( order=2, rank=32, optimizer=tf.train.AdamOptimizer(learning_rate=0.001), n_epochs=3, batch_size=512, init_std=0.01, reg=0.01, input_type='sparse', seed=1 ) model2.core.set_num_features(X_tr.shape[1]) model2.load_state('./tmp/state.tf')

then input your testing sample and get the result

Anncastle avatar May 15 '20 07:05 Anncastle