Here's some mock-up code, I didn't test it, it just to give you an idea where to start:
mm = MixMatch(<...list of parameters used when training...>)
mm.eval_mode(<checkpoint_filename or None for the latest one>)
logits = mm.session.run(mm.ops.classify_op, feed_dict={mm.ops.x: images})
# Where images is of dimensions (batch, height, width, colors)
# The predicted classes would be np.argmax(logits)
# To compute distribution would require you to compute the softmax of the logits.
There's no code for processing a single picture. That being said it should be easy to write code for your needs by looking, for example, at how the
eval_ckpt
flag is implemented: https://github.com/google-research/mixmatch/blob/master/libml/train.py#L37Here's some mock-up code, I didn't test it, it just to give you an idea where to start:
Hope this helps.