import numpy as np
import torch.nn
import mdf2torch

# Load Model
models = mdf2torch.load("example_mdfs/mlp_classifier", eval_models=True)
model = models["mlp_classifier"]

# Iterate on training data, feed forward and log accuracy
imgs = np.load("example_data/imgs.npy")
labels = np.load("example_data/labels.npy")

for i in range(len(imgs)):
    img = torch.Tensor(imgs[i,:,:]).view(-1, 14*14)
    target = labels[i]
    prediction = model(img)
    print(target, prediction)

94c2f9a2c1bfaf7c33796902625e8b840d7d2142
<mask token>

<mask token>
for i in range(len(imgs)):
    img = torch.Tensor(imgs[i, :, :]).view(-1, 14 * 14)
    target = labels[i]
    prediction = model(img)
    print(target, prediction)

<mask token>
models = mdf2torch.load('example_mdfs/mlp_classifier', eval_models=True)
model = models['mlp_classifier']
imgs = np.load('example_data/imgs.npy')
labels = np.load('example_data/labels.npy')
for i in range(len(imgs)):
    img = torch.Tensor(imgs[i, :, :]).view(-1, 14 * 14)
    target = labels[i]
    prediction = model(img)
    print(target, prediction)

import numpy as np
import torch.nn
import mdf2torch
models = mdf2torch.load('example_mdfs/mlp_classifier', eval_models=True)
model = models['mlp_classifier']
imgs = np.load('example_data/imgs.npy')
labels = np.load('example_data/labels.npy')
for i in range(len(imgs)):
    img = torch.Tensor(imgs[i, :, :]).view(-1, 14 * 14)
    target = labels[i]
    prediction = model(img)
    print(target, prediction)

import numpy as np
import torch.nn
import mdf2torch

# Load Model
models = mdf2torch.load("example_mdfs/mlp_classifier", eval_models=True)
model = models["mlp_classifier"]

# Iterate on training data, feed forward and log accuracy
imgs = np.load("example_data/imgs.npy")
labels = np.load("example_data/labels.npy")

for i in range(len(imgs)):
    img = torch.Tensor(imgs[i,:,:]).view(-1, 14*14)
    target = labels[i]
    prediction = model(img)
    print(target, prediction)
