File size: 1,371 Bytes
664a799
 
 
 
 
 
c18b721
 
 
 
 
 
664a799
 
 
 
 
 
 
 
c18b721
664a799
a15eba1
1d43aaa
664a799
 
 
 
c18b721
 
 
 
 
 
0c76ba3
 
 
c18b721
0c76ba3
 
 
c18b721
a16d797
513b119
0c76ba3
 
c18b721
 
 
664a799
c18b721
 
 
 
664a799
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#! /usr/bin/env bash

function fashion_mnist() {
    local task=$(abcli_unpack_keyword $1 help)

    if [ $task == "help" ] ; then
        abcli_help_line "fashion_mnist ingest" \
            "ingest fashion_mnist data."
        abcli_help_line "fashion_mnist predict object_1" \
            "run fashion_mnist model object_1 predict."
        abcli_help_line "fashion_mnist train" \
            "train fashion_mnist."

        if [ "$(abcli_keyword_is $2 verbose)" == true ] ; then
            python3 -m fashion_mnist --help
        fi

        return
    fi

    if [ "$task" == "ingest" ] ; then
        python3 -m fashion_mnist \
            ingest \
            --output_path $abcli_object_path \
            ${@:2}
        return
    fi

    if [ "$task" == "predict" ] ; then
        abcli_fashion_mnist ingest
        abcli_image_classifier_predict ${@:2}
    fi

    if [ "$task" == "train" ] ; then
        local model_object=$abcli_object_name

        abcli_select - ~trail
        abcli_fashion_mnist ingest
        local data_object=$abcli_object_name

        abcli_select $model_object ~trail
        abcli_image_classifier_train \
            $data_object \
            ~color,~convnet \
            ${@:2}

        return
    fi

    abcli_log_error "-fashion_mnist: $task: command not found."
}

function abcli_fashion_mnist() {
    fashion_mnist $@
}