def compute_predictions(sess, x, preds_op, images, batch_size): images = images[:100] preds = run_batches(sess, preds_op, [x], [images], batch_size) print(preds)
def compute_logits(sess, x, logits_op, images, batch_size): images = images[:100] logits = run_batches(sess, logits_op, [x], [images], batch_size) for l in logits: print(l)
def compute_predictions(sess, x, preds_op, images, batch_size): # images = images[:100] return run_batches(sess, preds_op, [x], [images], batch_size)
def evaluate(sess, x, y, pred_op, images, labels, batch_size): preds = run_batches(sess, pred_op, [x], [images], batch_size) acc = np.sum(preds == labels) / len(labels) print("accuracy: %0.04f" % acc)
def compute_logits(sess, x, logits_op, images, batch_size): # images = images[:100] return run_batches(sess, logits_op, [x], [images], batch_size)