Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
akshit96 opened this issue May 10, 2018 · 1 comment

Comments

@akshit96
Copy link

akshit96 commented May 10, 2018

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

@Anncastle
Copy link

Anncastle commented May 15, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants