728x90

참고사이트

http://www.bloter.net/archives/248534
https://tensorflow.blog/2017/02/13/chainer-mxnet-cntk-tf-benchmarking/
https://github.com/Microsoft/CNTK
https://cntk.codeplex.com/

Microsoft Cognitive Toolkit (CNTK) : MS, 오픈소스 딥러닝 툴킷

CNTK 를 이용하여 딥러닝 관련해 C# 으로 코딩이 가능하다고 하여 한번 확인해 봤습니다.

 

아래 그림과 같이 Visual Studio 의 NuGet 을 이용하여 간단히 라이브러리를 가져올 수 있습니다.

아래파일은 위 깃허브사이트에서 C# Sample 만 가져온것입니다.

TrainingCSharp.zip

압축을 풀고 아래 과정을 거쳐야합니다.

NuGet 패키지 복원 을 통해 위에 언급했던 CNTK 라이브러리를 가져옵니다.

가져오는데 좀 시간이 걸립니다. 복원이 끝났으면

빌드해봅니다.

???

아래처럼 에러가 4군데가 나옵니다.

다행히도 아래 그림과 같이 메서드의 인자중 false 부분을 제거해 주면됩니다.

(버전이 올라가면서 이부분이 없어진것 으로 보입니다. 추측)

또 수정..

CPU 버전을 실행해 봤습니다.

소스를 보면 여러 방법으로의 결과 값을 도출해 볼수가 있습니다.

속 내용은 나중에 더 소스레벨로 가면 파악을 해볼 예정입니다.

GPU 버전은 아래처럼 에러가 발생됩니다.

에러 내용을 보니 해당 경로에서 먼가를 못찾는것 같네요

( Could not open ../../Examples/Image/DataSets/CIFAR-10\train_map.txt for reading. )

구글링하니 먼가 샘플 데이터를 다운받아서 처리를 해야하나봅니다.

누군가 이슈한 내용 https://github.com/Microsoft/CNTK/issues/690

샘플 데이터 셋을 가져오는방법 https://github.com/Microsoft/CNTK/tree/master/Examples/Image/DataSets/CIFAR-10

샘플데이터를 가져오는것 때문에 파이썬이 설치 되어있어야합니다.^^;

아래 처럼 파이썬이 설치된 상태에서 cmd 창에서 install_cifar10.py 파일이 있는 폴더로 이동하여 

python install_cifar10.py

명령을 수행합니다.

다운파일 용량이 좀 커서 시간이 걸립니다.

참고로 전 위 방법이 안되서 다른 경로(http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz)로

CIFAR-10 폴더에 파일을 다운받은 다음 

cifar_utils.py 파일을 편집하여에 아래 내용을 추가한 후

def load(fname):
    try:
        print ('Extracting files...')
        with tarfile.open(fname) as tar:
            tar.extractall()
        print ('Done.')
        print ('Preparing train set...')
        trn = np.empty((0, NumFeat + 1), dtype=np.int)
        for i in range(5):
            batchName = './cifar-10-batches-py/data_batch_{0}'.format(i + 1)
            trn = np.vstack((trn, readBatch(batchName)))
        print ('Done.')
        print ('Preparing test set...')
        tst = readBatch('./cifar-10-batches-py/test_batch')
        print ('Done.')
    finally:
        os.remove(fname)
    return (trn, tst)

install_cifar10.py 파일을 아래와 같이 수정하여 명령을 실행했습니다.

from __future__ import print_function
import cifar_utils as ut

if __name__ == "__main__":
    trn, tst= ut.load(r'./cifar-10-python.tar.gz')
    print ('Writing train text file...')
    ut.saveTxt(r'./Train_cntk_text.txt', trn)
    print ('Done.')
    print ('Writing test text file...')
    ut.saveTxt(r'./Test_cntk_text.txt', tst)
    print ('Done.')

    print ('Converting train data to png images...')
    ut.saveTrainImages(r'./Train_cntk_text.txt', 'train')
    print ('Done.')
    print ('Converting test data to png images...')
    ut.saveTestImages(r'./Test_cntk_text.txt', 'test')
    print ('Done.')

(위 내용을 알려주신 빅코드 님께 감사합니다. 빅코드 http://bigcode.tistory.com/)

이 후로도 계속 샘플 데이터가 없어서 에러가 발생되는데 해당 경로의 깃허브페이지에 가면 샘플데이터 다운로드 방법이 나와있습니다.

아래는 순서대로 발생되는 에러와 링크 명령어 순입니다.

해당 파일 경로로 가서 실행하면됩니다.

(다 정리가 안된것일수도 있습니다. 에러난 경우 깃허브에서 에러난 경로폴더로 가면 해결방법이 있습니다.)

1

에러캡쳐못함

https://github.com/Microsoft/CNTK/tree/master/Examples/Image/DataSets/Flowers

python install_flowers.py

2

Cannot open file '.D:/CNTK-master/PretrainedModels/ResNet18_ImageNet_CNTK.model' for reading

https://github.com/Microsoft/CNTK/tree/master/PretrainedModels

python download_model.py ResNet18_ImageNet_CNTK

3

'D:\CNTK-master\Examples\Image\DataSets\Animals\Train\Sheep' 경로의 일부를 찾을 수 없습니다.

https://github.com/Microsoft/CNTK/tree/master/Examples/Image/DataSets/Animals

python install_animals.py

 

위 에러가 모두 해결되면 아래처럼 에러없이 수행이 완료됩니다.

작업관리자 를 열어보니 GPU 를 잘 쓰고 있네요

그런데 CPU 도 엄청나게 쓰고 있습니다.;;

 

아래는 로그 전체 내용입니다.

======== running LogisticRegression.TrainAndEvaluate using GPU ========
Minibatch: 0 CrossEntropyLoss = 0.6931471, EvaluationCriterion = 0.5
Minibatch: 50 CrossEntropyLoss = 21.55996, EvaluationCriterion = 0.5
Minibatch: 100 CrossEntropyLoss = 5.931237, EvaluationCriterion = 0.4375
Minibatch: 150 CrossEntropyLoss = 0.1059439, EvaluationCriterion = 0.03125
Minibatch: 200 CrossEntropyLoss = 0.07103035, EvaluationCriterion = 0.03125
Minibatch: 250 CrossEntropyLoss = 0.06985503, EvaluationCriterion = 0.015625
Minibatch: 300 CrossEntropyLoss = 0.06981656, EvaluationCriterion = 0.015625
Minibatch: 350 CrossEntropyLoss = 0.06978078, EvaluationCriterion = 0.015625
Minibatch: 400 CrossEntropyLoss = 0.06974529, EvaluationCriterion = 0.015625
Minibatch: 450 CrossEntropyLoss = 0.06970999, EvaluationCriterion = 0.015625
Minibatch: 500 CrossEntropyLoss = 0.06967509, EvaluationCriterion = 0.015625
Minibatch: 550 CrossEntropyLoss = 0.06964055, EvaluationCriterion = 0.015625
Minibatch: 600 CrossEntropyLoss = 0.06960642, EvaluationCriterion = 0.015625
Minibatch: 650 CrossEntropyLoss = 0.06957255, EvaluationCriterion = 0.015625
Minibatch: 700 CrossEntropyLoss = 0.06953903, EvaluationCriterion = 0.015625
Minibatch: 750 CrossEntropyLoss = 0.06950578, EvaluationCriterion = 0.015625
Minibatch: 800 CrossEntropyLoss = 0.06947294, EvaluationCriterion = 0.015625
Minibatch: 850 CrossEntropyLoss = 0.06944047, EvaluationCriterion = 0.015625
Minibatch: 900 CrossEntropyLoss = 0.06940824, EvaluationCriterion = 0.015625
Minibatch: 950 CrossEntropyLoss = 0.06937636, EvaluationCriterion = 0.015625
Validating Model: Total Samples = 100, Misclassify Count = 3
======== running MNISTClassifier.TrainAndEvaluate with multilayer perceptron (MLP) classifier using GPU ========
Minibatch: 0 CrossEntropyLoss = 2.522058, EvaluationCriterion = 0.90625
Minibatch: 20 CrossEntropyLoss = 1.48611, EvaluationCriterion = 0.53125
Minibatch: 40 CrossEntropyLoss = 0.7296466, EvaluationCriterion = 0
Minibatch: 60 CrossEntropyLoss = 0.2474198, EvaluationCriterion = 0
Validating Model: Total Samples = 50, Misclassify Count = 0
Validating Model: Total Samples = 100, Misclassify Count = 0
Model Validation Error = 0
======== running MNISTClassifier.TrainAndEvaluate with convolutional neural network using GPU ========
Minibatch: 0 CrossEntropyLoss = 2.306932, EvaluationCriterion = 0.90625
Minibatch: 20 CrossEntropyLoss = 2.257694, EvaluationCriterion = 0.90625
Minibatch: 40 CrossEntropyLoss = 2.49947, EvaluationCriterion = 0.75
Minibatch: 60 CrossEntropyLoss = 0.008215316, EvaluationCriterion = 0
Validating Model: Total Samples = 50, Misclassify Count = 0
Validating Model: Total Samples = 100, Misclassify Count = 0
Model Validation Error = 0
======== running CifarResNet.TrainAndEvaluate using GPU ========
Minibatch: 0 CrossEntropyLoss = 2.436417, EvaluationCriterion = 0.578125
Minibatch: 20 CrossEntropyLoss = 2.82905, EvaluationCriterion = 0.53125
Minibatch: 40 CrossEntropyLoss = 2.356529, EvaluationCriterion = 0.390625
Minibatch: 60 CrossEntropyLoss = 2.325535, EvaluationCriterion = 0.34375
Minibatch: 80 CrossEntropyLoss = 2.139973, EvaluationCriterion = 0.3125
Minibatch: 100 CrossEntropyLoss = 2.308036, EvaluationCriterion = 0.28125
Minibatch: 120 CrossEntropyLoss = 2.250129, EvaluationCriterion = 0.28125
Minibatch: 140 CrossEntropyLoss = 2.009432, EvaluationCriterion = 0.265625
Minibatch: 160 CrossEntropyLoss = 2.233116, EvaluationCriterion = 0.265625
Minibatch: 180 CrossEntropyLoss = 2.071544, EvaluationCriterion = 0.203125
Minibatch: 200 CrossEntropyLoss = 2.117138, EvaluationCriterion = 0.265625
Minibatch: 220 CrossEntropyLoss = 2.069477, EvaluationCriterion = 0.15625
Minibatch: 240 CrossEntropyLoss = 1.965702, EvaluationCriterion = 0.1875
Minibatch: 260 CrossEntropyLoss = 1.978837, EvaluationCriterion = 0.28125
Minibatch: 280 CrossEntropyLoss = 1.908777, EvaluationCriterion = 0.140625
Minibatch: 300 CrossEntropyLoss = 1.88479, EvaluationCriterion = 0.15625
Minibatch: 320 CrossEntropyLoss = 1.853574, EvaluationCriterion = 0.171875
Minibatch: 340 CrossEntropyLoss = 1.933644, EvaluationCriterion = 0.15625
Minibatch: 360 CrossEntropyLoss = 1.850995, EvaluationCriterion = 0.1875
Minibatch: 380 CrossEntropyLoss = 1.877189, EvaluationCriterion = 0.125
Minibatch: 400 CrossEntropyLoss = 1.943855, EvaluationCriterion = 0.125
Minibatch: 420 CrossEntropyLoss = 1.656677, EvaluationCriterion = 0.09375
Minibatch: 440 CrossEntropyLoss = 1.931162, EvaluationCriterion = 0.171875
Minibatch: 460 CrossEntropyLoss = 2.053334, EvaluationCriterion = 0.203125
Minibatch: 480 CrossEntropyLoss = 1.858578, EvaluationCriterion = 0.171875
Minibatch: 500 CrossEntropyLoss = 1.872365, EvaluationCriterion = 0.1875
Minibatch: 520 CrossEntropyLoss = 1.828443, EvaluationCriterion = 0.09375
Minibatch: 540 CrossEntropyLoss = 1.710754, EvaluationCriterion = 0.125
Minibatch: 560 CrossEntropyLoss = 1.857575, EvaluationCriterion = 0.171875
Minibatch: 580 CrossEntropyLoss = 1.790916, EvaluationCriterion = 0.15625
Minibatch: 600 CrossEntropyLoss = 1.613939, EvaluationCriterion = 0.125
Minibatch: 620 CrossEntropyLoss = 1.904525, EvaluationCriterion = 0.15625
Minibatch: 640 CrossEntropyLoss = 1.649971, EvaluationCriterion = 0.046875
Minibatch: 660 CrossEntropyLoss = 1.776515, EvaluationCriterion = 0.078125
Minibatch: 680 CrossEntropyLoss = 1.810719, EvaluationCriterion = 0.1875
Minibatch: 700 CrossEntropyLoss = 1.846062, EvaluationCriterion = 0.109375
Minibatch: 720 CrossEntropyLoss = 1.813215, EvaluationCriterion = 0.125
Minibatch: 740 CrossEntropyLoss = 1.676595, EvaluationCriterion = 0.15625
Minibatch: 760 CrossEntropyLoss = 1.6078, EvaluationCriterion = 0.0625
Minibatch: 780 CrossEntropyLoss = 1.706012, EvaluationCriterion = 0.125
Validating Model: Total Samples = 50, Misclassify Count = 30
Validating Model: Total Samples = 100, Misclassify Count = 60
Validating Model: Total Samples = 150, Misclassify Count = 93
Validating Model: Total Samples = 200, Misclassify Count = 128
Validating Model: Total Samples = 250, Misclassify Count = 159
Validating Model: Total Samples = 300, Misclassify Count = 191
Validating Model: Total Samples = 350, Misclassify Count = 228
Validating Model: Total Samples = 400, Misclassify Count = 260
Validating Model: Total Samples = 450, Misclassify Count = 290
Validating Model: Total Samples = 500, Misclassify Count = 322
Validating Model: Total Samples = 550, Misclassify Count = 355
Validating Model: Total Samples = 600, Misclassify Count = 386
Validating Model: Total Samples = 650, Misclassify Count = 422
Validating Model: Total Samples = 700, Misclassify Count = 449
Validating Model: Total Samples = 750, Misclassify Count = 481
Validating Model: Total Samples = 800, Misclassify Count = 518
Validating Model: Total Samples = 850, Misclassify Count = 556
Validating Model: Total Samples = 900, Misclassify Count = 586
Validating Model: Total Samples = 950, Misclassify Count = 614
Validating Model: Total Samples = 1000, Misclassify Count = 643
Validating Model: Total Samples = 1050, Misclassify Count = 677
Model Validation Error = 0.6447619
======== running TransferLearning.TrainAndEvaluateWithFlowerData using GPU ========
Minibatch: 0 CrossEntropyLoss = 6.376731, EvaluationCriterion = 0.98
Minibatch: 1 CrossEntropyLoss = 5.912456, EvaluationCriterion = 1
Minibatch: 2 CrossEntropyLoss = 5.784322, EvaluationCriterion = 0.98
Minibatch: 3 CrossEntropyLoss = 5.978668, EvaluationCriterion = 1
Minibatch: 4 CrossEntropyLoss = 5.591482, EvaluationCriterion = 0.98
Minibatch: 5 CrossEntropyLoss = 5.338925, EvaluationCriterion = 1
Minibatch: 6 CrossEntropyLoss = 5.432095, EvaluationCriterion = 0.94
Minibatch: 7 CrossEntropyLoss = 5.182735, EvaluationCriterion = 0.96
Minibatch: 8 CrossEntropyLoss = 5.073693, EvaluationCriterion = 0.96
Minibatch: 9 CrossEntropyLoss = 5.095917, EvaluationCriterion = 0.94
Minibatch: 10 CrossEntropyLoss = 5.162372, EvaluationCriterion = 0.96
Minibatch: 11 CrossEntropyLoss = 4.770968, EvaluationCriterion = 0.92
Minibatch: 12 CrossEntropyLoss = 4.488997, EvaluationCriterion = 0.96
Minibatch: 13 CrossEntropyLoss = 4.279219, EvaluationCriterion = 0.92
Minibatch: 14 CrossEntropyLoss = 4.384006, EvaluationCriterion = 0.92
Minibatch: 15 CrossEntropyLoss = 3.860513, EvaluationCriterion = 0.76
Minibatch: 16 CrossEntropyLoss = 4.473601, EvaluationCriterion = 0.94
Minibatch: 17 CrossEntropyLoss = 3.700306, EvaluationCriterion = 0.8
Minibatch: 18 CrossEntropyLoss = 3.551464, EvaluationCriterion = 0.78
Minibatch: 19 CrossEntropyLoss = 3.234652, EvaluationCriterion = 0.74
Minibatch: 20 CrossEntropyLoss = 3.344814, EvaluationCriterion = 0.72
Minibatch: 21 CrossEntropyLoss = 2.370456, EvaluationCriterion = 0.48
Minibatch: 22 CrossEntropyLoss = 2.577497, EvaluationCriterion = 0.56
Minibatch: 23 CrossEntropyLoss = 2.089722, EvaluationCriterion = 0.46
Minibatch: 24 CrossEntropyLoss = 2.142577, EvaluationCriterion = 0.48
Minibatch: 25 CrossEntropyLoss = 1.63586, EvaluationCriterion = 0.32
Minibatch: 26 CrossEntropyLoss = 1.697923, EvaluationCriterion = 0.32
Minibatch: 27 CrossEntropyLoss = 1.921223, EvaluationCriterion = 0.42
Minibatch: 28 CrossEntropyLoss = 2.140446, EvaluationCriterion = 0.48
Minibatch: 29 CrossEntropyLoss = 1.720678, EvaluationCriterion = 0.44
Minibatch: 30 CrossEntropyLoss = 1.671676, EvaluationCriterion = 0.36
Minibatch: 31 CrossEntropyLoss = 1.361708, EvaluationCriterion = 0.24
Minibatch: 32 CrossEntropyLoss = 1.813414, EvaluationCriterion = 0.46
Minibatch: 33 CrossEntropyLoss = 1.438443, EvaluationCriterion = 0.3
Minibatch: 34 CrossEntropyLoss = 1.750613, EvaluationCriterion = 0.36
Minibatch: 35 CrossEntropyLoss = 1.265645, EvaluationCriterion = 0.22
Minibatch: 36 CrossEntropyLoss = 1.230595, EvaluationCriterion = 0.24
Minibatch: 37 CrossEntropyLoss = 1.26008, EvaluationCriterion = 0.22
Minibatch: 38 CrossEntropyLoss = 1.325004, EvaluationCriterion = 0.36
Minibatch: 39 CrossEntropyLoss = 1.254509, EvaluationCriterion = 0.28
Minibatch: 40 CrossEntropyLoss = 1.150222, EvaluationCriterion = 0.22
Minibatch: 41 CrossEntropyLoss = 0.6521825, EvaluationCriterion = 0.12
Minibatch: 42 CrossEntropyLoss = 0.7118115, EvaluationCriterion = 0.1
Minibatch: 43 CrossEntropyLoss = 0.8022906, EvaluationCriterion = 0.2
Minibatch: 44 CrossEntropyLoss = 0.5807764, EvaluationCriterion = 0.06
Minibatch: 45 CrossEntropyLoss = 0.9290817, EvaluationCriterion = 0.16
Minibatch: 46 CrossEntropyLoss = 0.783923, EvaluationCriterion = 0.18
Minibatch: 47 CrossEntropyLoss = 0.7138124, EvaluationCriterion = 0.1
Minibatch: 48 CrossEntropyLoss = 0.7241775, EvaluationCriterion = 0.12
Minibatch: 49 CrossEntropyLoss = 0.6209024, EvaluationCriterion = 0.08
Minibatch: 50 CrossEntropyLoss = 0.5343745, EvaluationCriterion = 0.04
Minibatch: 51 CrossEntropyLoss = 0.6119491, EvaluationCriterion = 0.04
Minibatch: 52 CrossEntropyLoss = 0.5948975, EvaluationCriterion = 0.04
Minibatch: 53 CrossEntropyLoss = 0.8496073, EvaluationCriterion = 0.18
Minibatch: 54 CrossEntropyLoss = 0.7088032, EvaluationCriterion = 0.12
Minibatch: 55 CrossEntropyLoss = 0.6778691, EvaluationCriterion = 0.12
Minibatch: 56 CrossEntropyLoss = 0.787717, EvaluationCriterion = 0.1
Minibatch: 57 CrossEntropyLoss = 0.7307914, EvaluationCriterion = 0.14
Minibatch: 58 CrossEntropyLoss = 0.723028, EvaluationCriterion = 0.12
Minibatch: 59 CrossEntropyLoss = 0.7245494, EvaluationCriterion = 0.08
Minibatch: 60 CrossEntropyLoss = 0.6502786, EvaluationCriterion = 0.1
Minibatch: 61 CrossEntropyLoss = 0.428662, EvaluationCriterion = 0.04
Minibatch: 62 CrossEntropyLoss = 0.5050916, EvaluationCriterion = 0.02
Minibatch: 63 CrossEntropyLoss = 0.5084181, EvaluationCriterion = 0.08
Minibatch: 64 CrossEntropyLoss = 0.4810524, EvaluationCriterion = 0.04
Minibatch: 65 CrossEntropyLoss = 0.4666488, EvaluationCriterion = 0.02
Minibatch: 66 CrossEntropyLoss = 0.4906718, EvaluationCriterion = 0.04
Minibatch: 67 CrossEntropyLoss = 0.3945753, EvaluationCriterion = 0.02
Minibatch: 68 CrossEntropyLoss = 0.4147145, EvaluationCriterion = 0
Minibatch: 69 CrossEntropyLoss = 0.3473899, EvaluationCriterion = 0
Minibatch: 70 CrossEntropyLoss = 0.5157338, EvaluationCriterion = 0.02
Minibatch: 71 CrossEntropyLoss = 0.5085081, EvaluationCriterion = 0.04
Minibatch: 72 CrossEntropyLoss = 0.51373, EvaluationCriterion = 0.06
Minibatch: 73 CrossEntropyLoss = 0.4385281, EvaluationCriterion = 0.02
Minibatch: 74 CrossEntropyLoss = 0.4603481, EvaluationCriterion = 0.02
Minibatch: 75 CrossEntropyLoss = 0.4486012, EvaluationCriterion = 0.06
Minibatch: 76 CrossEntropyLoss = 0.4591454, EvaluationCriterion = 0.04
Minibatch: 77 CrossEntropyLoss = 0.5260396, EvaluationCriterion = 0
Minibatch: 78 CrossEntropyLoss = 0.706598, EvaluationCriterion = 0.08
Minibatch: 79 CrossEntropyLoss = 0.5765358, EvaluationCriterion = 0.06
Minibatch: 80 CrossEntropyLoss = 0.5874317, EvaluationCriterion = 0.02
Minibatch: 81 CrossEntropyLoss = 0.5182903, EvaluationCriterion = 0.02
Minibatch: 82 CrossEntropyLoss = 0.3909195, EvaluationCriterion = 0
Minibatch: 83 CrossEntropyLoss = 0.2754261, EvaluationCriterion = 0
Minibatch: 84 CrossEntropyLoss = 0.4089906, EvaluationCriterion = 0.02
Minibatch: 85 CrossEntropyLoss = 0.4094018, EvaluationCriterion = 0
Minibatch: 86 CrossEntropyLoss = 0.3839784, EvaluationCriterion = 0.02
Minibatch: 87 CrossEntropyLoss = 0.3867048, EvaluationCriterion = 0.02
Minibatch: 88 CrossEntropyLoss = 0.4980297, EvaluationCriterion = 0.02
Minibatch: 89 CrossEntropyLoss = 0.5621079, EvaluationCriterion = 0.04
Minibatch: 90 CrossEntropyLoss = 0.3717917, EvaluationCriterion = 0
Minibatch: 91 CrossEntropyLoss = 0.478934, EvaluationCriterion = 0.04
Minibatch: 92 CrossEntropyLoss = 0.4525187, EvaluationCriterion = 0.02
Minibatch: 93 CrossEntropyLoss = 0.37893, EvaluationCriterion = 0
Minibatch: 94 CrossEntropyLoss = 0.5599474, EvaluationCriterion = 0.04
Minibatch: 95 CrossEntropyLoss = 0.4755749, EvaluationCriterion = 0
Minibatch: 96 CrossEntropyLoss = 0.3936868, EvaluationCriterion = 0
Minibatch: 97 CrossEntropyLoss = 0.4732434, EvaluationCriterion = 0
Minibatch: 98 CrossEntropyLoss = 0.5267368, EvaluationCriterion = 0.02
Minibatch: 99 CrossEntropyLoss = 0.4697292, EvaluationCriterion = 0
Validating Model: Total Samples = 50, Misclassify Count = 10
Validating Model: Total Samples = 100, Misclassify Count = 26
Validating Model: Total Samples = 150, Misclassify Count = 37
Validating Model: Total Samples = 200, Misclassify Count = 44
Validating Model: Total Samples = 250, Misclassify Count = 56
Validating Model: Total Samples = 300, Misclassify Count = 68
Validating Model: Total Samples = 350, Misclassify Count = 77
Validating Model: Total Samples = 400, Misclassify Count = 92
Validating Model: Total Samples = 450, Misclassify Count = 106
Validating Model: Total Samples = 500, Misclassify Count = 121
Validating Model: Total Samples = 550, Misclassify Count = 132
Validating Model: Total Samples = 600, Misclassify Count = 146
Validating Model: Total Samples = 650, Misclassify Count = 153
Validating Model: Total Samples = 700, Misclassify Count = 167
Validating Model: Total Samples = 750, Misclassify Count = 179
Validating Model: Total Samples = 800, Misclassify Count = 190
Validating Model: Total Samples = 850, Misclassify Count = 202
Validating Model: Total Samples = 900, Misclassify Count = 214
Validating Model: Total Samples = 950, Misclassify Count = 226
Validating Model: Total Samples = 1000, Misclassify Count = 235
Model Validation Error = 0.2238095
======== running TransferLearning.TrainAndEvaluateWithAnimalData using GPU ========
Minibatch: 0 CrossEntropyLoss = 1.505954, EvaluationCriterion = 0.6
Minibatch: 0 CrossEntropyLoss = 2.901686, EvaluationCriterion = 0.6
Minibatch: 1 CrossEntropyLoss = 0.1998963, EvaluationCriterion = 0.06666667
Minibatch: 1 CrossEntropyLoss = 0.08895338, EvaluationCriterion = 0
Minibatch: 2 CrossEntropyLoss = 0.42899, EvaluationCriterion = 0.1333333
Minibatch: 2 CrossEntropyLoss = 0.001352779, EvaluationCriterion = 0
Minibatch: 3 CrossEntropyLoss = 0.1655133, EvaluationCriterion = 0.1333333
Minibatch: 3 CrossEntropyLoss = 8.967717E-05, EvaluationCriterion = 0
Minibatch: 4 CrossEntropyLoss = 0.01569983, EvaluationCriterion = 0
Minibatch: 4 CrossEntropyLoss = 0.008115022, EvaluationCriterion = 0
Validating Model: Total Samples = 10, Misclassify Count = 0
0
======== running LSTMSequenceClassifier.Train using GPU ========
Minibatch: 0 CrossEntropyLoss = 1.600743, EvaluationCriterion = 0.7272727
Minibatch: 20 CrossEntropyLoss = 1.49664, EvaluationCriterion = 0.3877551
Minibatch: 40 CrossEntropyLoss = 1.386893, EvaluationCriterion = 0.4210526
Minibatch: 60 CrossEntropyLoss = 1.35299, EvaluationCriterion = 0.4444444
Minibatch: 80 CrossEntropyLoss = 1.232572, EvaluationCriterion = 0.3902439
Minibatch: 100 CrossEntropyLoss = 1.209601, EvaluationCriterion = 0.3555556
Minibatch: 120 CrossEntropyLoss = 1.222984, EvaluationCriterion = 0.4130435

 

728x90
Posted by kjun.kr
,