tffm
tffm copied to clipboard
How can I verify the output of a row after loading the model into memory ?
I want to manually verify the prediction of a particular testing sample.
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