I have trained a model on some data using tflearn to do binary classification. The model was trained to a 97% accuracy. 

I want to use `model.load()` in another program to predict the class of some test input data. 

However, `model.load()` only works when I include the argument `weights_only=True`. When I omit that argument from model.load(), it throws an error:

```
NotFoundError (see above for traceback): Key is_training not found in checkpoint

```

When I get the model loaded and run some predictions on my small test set - the classifications seem strange.. The model predicts a perfect 1 in the 1st index every single time. To me this shouldn't be happening if the model was trained to a very high accuracy. Here's what the predictions look like (expected output on the right):

```
[[  5.59889193e-22   1.00000000e+00]    [0, 1]
 [  4.25160435e-22   1.00000000e+00]    [0, 1]
 [  6.65333618e-23   1.00000000e+00]    [0, 1]
 [  2.07748895e-21   1.00000000e+00]    [0, 1]
 [  1.77639440e-21   1.00000000e+00]    [0, 1]
 [  5.77486922e-18   1.00000000e+00]    [1, 0]
 [  2.70562403e-19   1.00000000e+00]    [1, 0]
 [  2.78288828e-18   1.00000000e+00]    [1, 0]
 [  6.10306495e-17   1.00000000e+00]    [1, 0]
 [  2.35787162e-19   1.00000000e+00]]   [1, 0]

```

Note: This test data was data used to train the model so should be able to classify correctly with high accuracy. 

The code for training the model:

```
tf.reset_default_graph()

train = pd.read_csv("/Users/darrentaggart/Library/Mobile Documents/com~apple~CloudDocs/Uni Documents/MEE4040 - Project 4/Coding Related Stuff/Neural Networks/modeltraindata_1280.csv")
test = pd.read_csv("/Users/darrentaggart/Library/Mobile Documents/com~apple~CloudDocs/Uni Documents/MEE4040 - Project 4/Coding Related Stuff/Neural Networks/modeltestdata_320.csv")

X = train.iloc[:,1:].values.astype(np.float32)
Y = np.array([np.array([int(i == l) for i in range(2)]) for l in 
train.iloc[:,:1].values])
test_x = test.iloc[:,1:].values.astype(np.float32)
test_y = np.array([np.array([int(i == l) for i in range(2)]) for l in 
test.iloc[:,:1].values])

X = X.reshape([-1, 16, 16, 1])
test_x = test_x.reshape([-1, 16, 16, 1])

convnet = input_data(shape=[None, 16, 16, 1], name='input')

initialization = tf.contrib.layers.variance_scaling_initializer(factor=1.0, mode='FAN_IN', uniform=False)

convnet = conv_2d(convnet, 32, 2, activation='elu', 
weights_init=initialization)
convnet = max_pool_2d(convnet, 2)

convnet = tflearn.layers.normalization.batch_normalization(convnet, beta=0.0, gamma=1.0, epsilon=1e-05, 
decay=0.9, stddev=0.002, trainable=True, restore=True, reuse=False, scope=None, name='BatchNormalization')

convnet = conv_2d(convnet, 64, 2, activation='elu', 
weights_init=initialization)
convnet = max_pool_2d(convnet, 2)

convnet = tflearn.layers.normalization.batch_normalization(convnet, beta=0.0, gamma=1.0, epsilon=1e-05, 
decay=0.9, stddev=0.002, trainable=True, restore=True, reuse=False, scope=None, name='BatchNormalization')

convnet = fully_connected(convnet, 254, activation='elu', weights_init=initialization)
convnet = dropout(convnet, 0.8)

convnet = tflearn.layers.normalization.batch_normalization(convnet, beta=0.0, gamma=1.0, epsilon=1e-05, 
decay=0.9, stddev=0.002, trainable=True, restore=True, reuse=False, scope=None, name='BatchNormalization')

convnet = fully_connected(convnet, 2, activation='softmax')
adam = tflearn.optimizers.Adam(learning_rate=0.00065, beta1=0.9, beta2=0.999, epsilon=1e-08)
convnet = regression(convnet, optimizer=adam, loss='categorical_crossentropy', name='targets')

model = tflearn.DNN(convnet, tensorboard_dir='/Users/darrentaggart/Library/Mobile Documents/com~apple~CloudDocs/Uni Documents/MEE4040 - Project 4/Coding Related Stuff/Neural Networks/latest logs',
tensorboard_verbose=3)

model.fit({'input': X}, {'targets': Y}, n_epoch=100, batch_size=16, 
validation_set=({'input': test_x}, {'targets': test_y}), snapshot_step=10, show_metric=True, run_id='1600 - ConvConvFC254 LR0.00065decay BN VSinit 16batchsize 100epochs')

model.save('tflearncnn.model')

```

Code for loading and generating predictions:

```
test = pd.read_csv("/Users/darrentaggart/Library/Mobile Documents/com~apple~CloudDocs/Uni Documents/MEE4040 - Project 4/Coding Related Stuff/Neural Networks/modelpredictiondata.csv")

X = test.iloc[:,1:].values.astype(np.float32)

sess=tf.InteractiveSession()

tflearn.is_training(False)

convnet = input_data(shape=[None, 16, 16, 1], name='input')

initialization = tf.contrib.layers.variance_scaling_initializer(factor=1.0, mode='FAN_IN', uniform=False)

convnet = conv_2d(convnet, 32, 2, activation='elu', weights_init=initialization)
convnet = max_pool_2d(convnet, 2)

convnet = tflearn.layers.normalization.batch_normalization(convnet, beta=0.0, gamma=1.0, epsilon=1e-05, 
decay=0.9, stddev=0.002, trainable=True, restore=True, reuse=False, scope=None, name='BatchNormalization')

convnet = conv_2d(convnet, 64, 2, activation='elu', weights_init=initialization)
convnet = max_pool_2d(convnet, 2)

convnet = tflearn.layers.normalization.batch_normalization(convnet, beta=0.0, gamma=1.0, epsilon=1e-05, 
decay=0.9, stddev=0.002, trainable=True, restore=True, reuse=False, scope=None, name='BatchNormalization')

convnet = fully_connected(convnet, 254, activation='elu', weights_init=initialization)

convnet = tflearn.layers.normalization.batch_normalization(convnet, beta=0.0, gamma=1.0, epsilon=1e-05, 
decay=0.9, stddev=0.002, trainable=True, restore=True, reuse=False, scope=None, name='BatchNormalization')

convnet = fully_connected(convnet, 2, activation='softmax')
adam = tflearn.optimizers.Adam(learning_rate=0.00065, beta1=0.9, beta2=0.999, epsilon=1e-08)
convnet = regression(convnet, optimizer=adam, loss='categorical_crossentropy', name='targets')

model = tflearn.DNN(convnet)

if os.path.exists('{}.meta'.format('tflearncnn.model')):
    model.load('tflearncnn.model', weights_only=False)
    print('model loaded!')

for i in enumerate(X):

    X = X.reshape([-1, 16, 16, 1])

    model_out = model.predict(X)

    if np.argmax(model_out) == 1: str_label='Boss'
    else: str_label = 'Slot'

print(model_out)

```

I know it's a long shot but thought someone might be able to shed some light on the matter. Thanks.