org.deeplearning4j.examples.dataexamples
BasicCSVClassifier
数据格式。一定要搞清楚数据格式,输入输出,才能构建网络。对应的是你手头有什么,想要做什么,预测什么?
训练日志。这个例子只是举例,训练的效果不考虑。
10:34:14,208 INFO ~ Loaded [CpuBackend] backend 10:34:15,497 INFO ~ Number of threads used for NativeOps: 2 10:34:15,960 INFO ~ Number of threads used for BLAS: 2 10:34:15,967 INFO ~ Backend used: [CPU]; OS: [Mac OS X] 10:34:15,967 INFO ~ Cores: [4]; Memory: [1.8GB]; 10:34:15,967 INFO ~ Blas vendor: [OPENBLAS] 10:34:16,373 INFO ~ Build model.... 10:34:21,827 INFO ~ Starting MultiLayerNetwork with WorkspaceModes set to [training: NONE; inference: SEPARATE] 10:34:21,919 INFO ~ Score at iteration 0 is 1.225375238425816 10:34:22,283 INFO ~ Score at iteration 100 is 0.48460171303588173 10:34:22,486 INFO ~ Score at iteration 200 is 0.10431363973613487 10:34:22,674 INFO ~ Score at iteration 300 is 0.04745909009133633 10:34:22,849 INFO ~ Score at iteration 400 is 0.02975828966283905 10:34:23,019 INFO ~ Score at iteration 500 is 0.02133654741365093 10:34:23,206 INFO ~ Score at iteration 600 is 0.016472989013509194 10:34:23,376 INFO ~ Score at iteration 700 is 0.013329870891324978 10:34:23,520 INFO ~ Score at iteration 800 is 0.011143243188705208 10:34:23,667 INFO ~ Score at iteration 900 is 0.009540781916449465 10:34:23,960 INFO ~ Examples labeled as 0 classified by model as 0: 8 times Examples labeled as 0 classified by model as 1: 13 times Examples labeled as 0 classified by model as 2: 23 times Warning: 2 classes were never predicted by the model and were excluded from average recall Classes excluded from average recall: [1, 2] ==========================Scores======================================== # of classes: 3 Accuracy: 0.1818 Precision: 0.3333 Recall: 0.1818 (2 classes excluded from average) F1 Score: 0.3077 (2 classes excluded from average) Precision, recall & F1: macro-averaged (equally weighted avg. of 3 classes) ======================================================================== 10:34:23,964 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=10.0, yearsLived=19} 10:34:23,964 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=60.0, yearsLived=9} 10:34:23,964 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=12.0, yearsLived=17} 10:34:23,964 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=50.0, yearsLived=9} 10:34:23,964 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=16.0, yearsLived=15} 10:34:23,964 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=70.0, yearsLived=9} 10:34:23,964 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=70.0, yearsLived=7} 10:34:23,964 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=40.0, yearsLived=10} 10:34:23,964 INFO ~ {eats=Ice Cream, sounds=Bark, classifier=Dog, weight=100.0, yearsLived=11} 10:34:23,964 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=10.0, yearsLived=19} 10:34:23,964 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=60.0, yearsLived=9} 10:34:23,965 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=12.0, yearsLived=17} 10:34:23,965 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=50.0, yearsLived=9} 10:34:23,966 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=16.0, yearsLived=15} 10:34:23,966 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=70.0, yearsLived=9} 10:34:23,966 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=70.0, yearsLived=7} 10:34:23,966 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=40.0, yearsLived=10} 10:34:23,966 INFO ~ {eats=Ice Cream, sounds=Bark, classifier=Dog, weight=100.0, yearsLived=11} 10:34:23,966 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=10.0, yearsLived=19} 10:34:23,966 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=60.0, yearsLived=9} 10:34:23,966 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=12.0, yearsLived=17} 10:34:23,966 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=50.0, yearsLived=9} 10:34:23,966 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=16.0, yearsLived=15} 10:34:23,966 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=70.0, yearsLived=9} 10:34:23,966 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=70.0, yearsLived=7} 10:34:23,966 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=40.0, yearsLived=10} 10:34:23,966 INFO ~ {eats=Ice Cream, sounds=Bark, classifier=Dog, weight=100.0, yearsLived=11} 10:34:23,966 INFO ~ {eats=Hotdogs, sounds=Talking, classifier=Human, weight=200.0, yearsLived=80} 10:34:23,966 INFO ~ {eats=Hotdogs, sounds=Talking, classifier=Human, weight=170.0, yearsLived=65} 10:34:23,966 INFO ~ {eats=Hotdogs, sounds=Talking, classifier=Human, weight=170.0, yearsLived=65} 10:34:23,966 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=70.0, yearsLived=7} 10:34:23,966 INFO ~ {eats=Hotdogs, sounds=Talking, classifier=Human, weight=170.0, yearsLived=65} 10:34:23,966 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=62.0, yearsLived=9} 10:34:23,967 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=70.0, yearsLived=7} 10:34:23,967 INFO ~ {eats=Hotdogs, sounds=Talking, classifier=Human, weight=170.0, yearsLived=44} 10:34:23,967 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=12.0, yearsLived=17} 10:34:23,967 INFO ~ {eats=Ice Cream, sounds=Singing, classifier=Human, weight=160.0, yearsLived=55} 10:34:23,967 INFO ~ {eats=Hotdogs, sounds=Bark, classifier=Dog, weight=65.0, yearsLived=8} 10:34:23,967 INFO ~ {eats=Cats, sounds=Bark, classifier=Dog, weight=14.0, yearsLived=9} 10:34:23,967 INFO ~ {eats=Hotdogs, sounds=Talking, classifier=Human, weight=150.0, yearsLived=72} 10:34:23,967 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=12.0, yearsLived=17} 10:34:23,967 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=16.0, yearsLived=20} 10:34:23,967 INFO ~ {eats=Mice, sounds=Meow, classifier=Cat, weight=23.0, yearsLived=19} 10:34:23,967 INFO ~ {eats=Ice Cream, sounds=Singing, classifier=Human, weight=300.0, yearsLived=80}