<jupyter_start><jupyter_text>모델 펼처보기<jupyter_code>cifar_model.show_model()
history_train = cifar_model.train(X_train, Y_train, epoch = 200, 
                                  batch_size = 16, aug_data = True)
#  model evaluate
result = cifar_model.show_eval(X_test, Y_test, 32)
print('Test Loss : ', result[0])
print('Test Accuracy : ', result[1]*100, '%')
prediction = cifar_model.predict(X_test)
print(Y_test_origin[:8])
print(prediction[:8])
show_images(X_test_origin, Y_test_origin, 8)
show_images(X_test_origin, prediction, 8)
show_images_compare(X_test_origin, Y_test_origin, prediction)
result = cifar_model.show_eval(X_test, Y_test, 32)
print('predict class : ',cifar_model.model.predict(X_test[:3]))
print('predict class : ',cifar_model.model.predict_classes(X_test[:3]))
cifar10_VGG.plot_acc(history_train)
cifar10_VGG.plot_loss(history_train)
history_train.history['acc'][-1]
Y_prediction = prediction

# label shape is digit
print(confusion_mat(Y_test_origin, Y_prediction))
print(confusion_report(Y_test_origin, Y_prediction))
np.unique(Y_test_origin)
cifar_model.model.pop()
cifar_model.show_model()<jupyter_output>_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
lambda_1 (Lambda)            (None, 32, 32, 3)         0         
_________________________________________________________________
conv2d_1 (Conv2D)            (None, 32, 32, 64)        1792      
_________________________________________________________________
batch_normalization_1 (Batch (None, 32, 32, 64)        256       
_________________________________________________________________
activation_1 (Activation)    (None, 32, 32, 64)        0         
_________________________________________________________________
conv2d_2 (Conv2D)            (None, 32, 32, 64)        36928     
_________________________________________________________________
batch_normalization_2 (Batch (None, 32, 32, 64)        256       
_________________________________________________________________
activation[...]
{'fraction_non_alphanumeric': 0.1204311152764761, 'fraction_numerical': 0.04076850984067479, 'mean_word_length': 5.170520231213873, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '538157', 'license': 'MIT', 'n_tokens_mistral': 674, 'n_tokens_neox': 602, 'n_words': 110, 'path': 'cifar10_vgg_ex1.ipynb', 'repo_name': 'IzPerfect/CIFAR-10-Classification', 'size': '2134'}