Exemple #1
0
def test_census_example_to_bytes():
    import tensorflow as tf
    b = predict.census_to_example_bytes(JSON)
    assert tf.train.Example.FromString(b) == tf.train.Example.FromString(
        BYTESTRING)
def test_census_example_to_bytes():
    import tensorflow as tf
    b = predict.census_to_example_bytes(JSON)
    assert tf.train.Example.FromString(b) == tf.train.Example.FromString(
        BYTESTRING)
Exemple #3
0
def test_census_example_to_bytes():
    b = predict.census_to_example_bytes(JSON)
    assert base64.b64encode(b) is not None
Exemple #4
0
def test_predict_tfrecords():
    b = predict.census_to_example_bytes(JSON)
    result = predict.predict_tfrecords(PROJECT,
                                       MODEL, [b, b],
                                       version=TF_RECORDS_VERSION)
    assert [EXPECTED_OUTPUT, EXPECTED_OUTPUT] == result
Exemple #5
0
def test_predict_examples():
    b = predict.census_to_example_bytes(JSON)
    result = predict.predict_examples(PROJECT,
                                      MODEL, [b, b],
                                      version=EXAMPLES_VERSION)
    assert [EXPECTED_OUTPUT, EXPECTED_OUTPUT] == result