diff options
Diffstat (limited to 'model-integration/src/test/models/tensorflow/dropout')
-rw-r--r-- | model-integration/src/test/models/tensorflow/dropout/dropout.py | 44 | ||||
-rw-r--r-- | model-integration/src/test/models/tensorflow/dropout/saved/saved_model.pbtxt | 2875 | ||||
-rw-r--r-- | model-integration/src/test/models/tensorflow/dropout/saved/variables/variables.data-00000-of-00001 | bin | 31400 -> 0 bytes | |||
-rw-r--r-- | model-integration/src/test/models/tensorflow/dropout/saved/variables/variables.index | bin | 165 -> 0 bytes |
4 files changed, 0 insertions, 2919 deletions
diff --git a/model-integration/src/test/models/tensorflow/dropout/dropout.py b/model-integration/src/test/models/tensorflow/dropout/dropout.py deleted file mode 100644 index 42c15cd2812..00000000000 --- a/model-integration/src/test/models/tensorflow/dropout/dropout.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -# Common imports -import numpy as np -import tensorflow as tf -import datetime - -now = datetime.datetime.utcnow().strftime("%Y%m%d%H%M%S") -root_logdir = "tf_logs" -logdir = "{}/run-{}/".format(root_logdir, now) - -n_inputs = 784 -n_outputs = 10 -dropout_rate = 0.5 # == 1 - keep_prob - -X = tf.placeholder(tf.float32, shape=(None, n_inputs), name="X") -y = tf.placeholder(tf.int64, shape=(None), name="y") -training = tf.placeholder_with_default(False, shape=(), name='training') - -def leaky_relu_with_small_constant(z, name=None): - return tf.maximum(tf.constant(0.01, shape=[1]) * z, z, name=name) - -X_drop = tf.layers.dropout(X, dropout_rate, training=training, name="xdrop") -output = tf.layers.dense(X_drop, n_outputs, activation=leaky_relu_with_small_constant, name="outputs") - -init = tf.global_variables_initializer() -file_writer = tf.summary.FileWriter(logdir, tf.get_default_graph()) - -with tf.Session() as sess: - init.run() - sess.run(output, feed_dict={training: False, X: np.random.random((1,784))}) - - export_path = "saved" - print('Exporting trained model to ', export_path) - builder = tf.saved_model.builder.SavedModelBuilder(export_path) - signature = tf.saved_model.signature_def_utils.predict_signature_def(inputs = {'x':X}, outputs = {'y':output}) - builder.add_meta_graph_and_variables(sess, - [tf.saved_model.tag_constants.SERVING], - signature_def_map={'serving_default':signature}) - builder.save(as_text=True) - -file_writer.close() - - diff --git a/model-integration/src/test/models/tensorflow/dropout/saved/saved_model.pbtxt b/model-integration/src/test/models/tensorflow/dropout/saved/saved_model.pbtxt deleted file mode 100644 index ad431f0460d..00000000000 --- a/model-integration/src/test/models/tensorflow/dropout/saved/saved_model.pbtxt +++ /dev/null @@ -1,2875 +0,0 @@ -saved_model_schema_version: 1 -meta_graphs { - meta_info_def { - stripped_op_list { - op { - name: "Add" - input_arg { - name: "x" - type_attr: "T" - } - input_arg { - name: "y" - type_attr: "T" - } - output_arg { - name: "z" - type_attr: "T" - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - type: DT_UINT8 - type: DT_INT8 - type: DT_INT16 - type: DT_INT32 - type: DT_INT64 - type: DT_COMPLEX64 - type: DT_COMPLEX128 - type: DT_STRING - } - } - } - } - op { - name: "Assign" - input_arg { - name: "ref" - type_attr: "T" - is_ref: true - } - input_arg { - name: "value" - type_attr: "T" - } - output_arg { - name: "output_ref" - type_attr: "T" - is_ref: true - } - attr { - name: "T" - type: "type" - } - attr { - name: "validate_shape" - type: "bool" - default_value { - b: true - } - } - attr { - name: "use_locking" - type: "bool" - default_value { - b: true - } - } - allows_uninitialized_input: true - } - op { - name: "BiasAdd" - input_arg { - name: "value" - type_attr: "T" - } - input_arg { - name: "bias" - type_attr: "T" - } - output_arg { - name: "output" - type_attr: "T" - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_FLOAT - type: DT_DOUBLE - type: DT_INT64 - type: DT_INT32 - type: DT_UINT8 - type: DT_UINT16 - type: DT_INT16 - type: DT_INT8 - type: DT_COMPLEX64 - type: DT_COMPLEX128 - type: DT_QINT8 - type: DT_QUINT8 - type: DT_QINT32 - type: DT_HALF - } - } - } - attr { - name: "data_format" - type: "string" - default_value { - s: "NHWC" - } - allowed_values { - list { - s: "NHWC" - s: "NCHW" - } - } - } - } - op { - name: "Const" - output_arg { - name: "output" - type_attr: "dtype" - } - attr { - name: "value" - type: "tensor" - } - attr { - name: "dtype" - type: "type" - } - } - op { - name: "Floor" - input_arg { - name: "x" - type_attr: "T" - } - output_arg { - name: "y" - type_attr: "T" - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - } - } - } - } - op { - name: "Identity" - input_arg { - name: "input" - type_attr: "T" - } - output_arg { - name: "output" - type_attr: "T" - } - attr { - name: "T" - type: "type" - } - } - op { - name: "MatMul" - input_arg { - name: "a" - type_attr: "T" - } - input_arg { - name: "b" - type_attr: "T" - } - output_arg { - name: "product" - type_attr: "T" - } - attr { - name: "transpose_a" - type: "bool" - default_value { - b: false - } - } - attr { - name: "transpose_b" - type: "bool" - default_value { - b: false - } - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - type: DT_INT32 - type: DT_COMPLEX64 - type: DT_COMPLEX128 - } - } - } - } - op { - name: "Maximum" - input_arg { - name: "x" - type_attr: "T" - } - input_arg { - name: "y" - type_attr: "T" - } - output_arg { - name: "z" - type_attr: "T" - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - type: DT_INT32 - type: DT_INT64 - } - } - } - is_commutative: true - } - op { - name: "Merge" - input_arg { - name: "inputs" - type_attr: "T" - number_attr: "N" - } - output_arg { - name: "output" - type_attr: "T" - } - output_arg { - name: "value_index" - type: DT_INT32 - } - attr { - name: "T" - type: "type" - } - attr { - name: "N" - type: "int" - has_minimum: true - minimum: 1 - } - } - op { - name: "MergeV2Checkpoints" - input_arg { - name: "checkpoint_prefixes" - type: DT_STRING - } - input_arg { - name: "destination_prefix" - type: DT_STRING - } - attr { - name: "delete_old_dirs" - type: "bool" - default_value { - b: true - } - } - is_stateful: true - } - op { - name: "Mul" - input_arg { - name: "x" - type_attr: "T" - } - input_arg { - name: "y" - type_attr: "T" - } - output_arg { - name: "z" - type_attr: "T" - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - type: DT_UINT8 - type: DT_INT8 - type: DT_UINT16 - type: DT_INT16 - type: DT_INT32 - type: DT_INT64 - type: DT_COMPLEX64 - type: DT_COMPLEX128 - } - } - } - is_commutative: true - } - op { - name: "NoOp" - } - op { - name: "Pack" - input_arg { - name: "values" - type_attr: "T" - number_attr: "N" - } - output_arg { - name: "output" - type_attr: "T" - } - attr { - name: "N" - type: "int" - has_minimum: true - minimum: 1 - } - attr { - name: "T" - type: "type" - } - attr { - name: "axis" - type: "int" - default_value { - i: 0 - } - } - } - op { - name: "Placeholder" - output_arg { - name: "output" - type_attr: "dtype" - } - attr { - name: "dtype" - type: "type" - } - attr { - name: "shape" - type: "shape" - default_value { - shape { - unknown_rank: true - } - } - } - } - op { - name: "PlaceholderWithDefault" - input_arg { - name: "input" - type_attr: "dtype" - } - output_arg { - name: "output" - type_attr: "dtype" - } - attr { - name: "dtype" - type: "type" - } - attr { - name: "shape" - type: "shape" - } - } - op { - name: "RandomUniform" - input_arg { - name: "shape" - type_attr: "T" - } - output_arg { - name: "output" - type_attr: "dtype" - } - attr { - name: "seed" - type: "int" - default_value { - i: 0 - } - } - attr { - name: "seed2" - type: "int" - default_value { - i: 0 - } - } - attr { - name: "dtype" - type: "type" - allowed_values { - list { - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - } - } - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_INT32 - type: DT_INT64 - } - } - } - is_stateful: true - } - op { - name: "RealDiv" - input_arg { - name: "x" - type_attr: "T" - } - input_arg { - name: "y" - type_attr: "T" - } - output_arg { - name: "z" - type_attr: "T" - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - type: DT_UINT8 - type: DT_INT8 - type: DT_UINT16 - type: DT_INT16 - type: DT_INT32 - type: DT_INT64 - type: DT_COMPLEX64 - type: DT_COMPLEX128 - } - } - } - } - op { - name: "RestoreV2" - input_arg { - name: "prefix" - type: DT_STRING - } - input_arg { - name: "tensor_names" - type: DT_STRING - } - input_arg { - name: "shape_and_slices" - type: DT_STRING - } - output_arg { - name: "tensors" - type_list_attr: "dtypes" - } - attr { - name: "dtypes" - type: "list(type)" - has_minimum: true - minimum: 1 - } - is_stateful: true - } - op { - name: "SaveV2" - input_arg { - name: "prefix" - type: DT_STRING - } - input_arg { - name: "tensor_names" - type: DT_STRING - } - input_arg { - name: "shape_and_slices" - type: DT_STRING - } - input_arg { - name: "tensors" - type_list_attr: "dtypes" - } - attr { - name: "dtypes" - type: "list(type)" - has_minimum: true - minimum: 1 - } - is_stateful: true - } - op { - name: "Shape" - input_arg { - name: "input" - type_attr: "T" - } - output_arg { - name: "output" - type_attr: "out_type" - } - attr { - name: "T" - type: "type" - } - attr { - name: "out_type" - type: "type" - default_value { - type: DT_INT32 - } - allowed_values { - list { - type: DT_INT32 - type: DT_INT64 - } - } - } - } - op { - name: "ShardedFilename" - input_arg { - name: "basename" - type: DT_STRING - } - input_arg { - name: "shard" - type: DT_INT32 - } - input_arg { - name: "num_shards" - type: DT_INT32 - } - output_arg { - name: "filename" - type: DT_STRING - } - } - op { - name: "StringJoin" - input_arg { - name: "inputs" - type: DT_STRING - number_attr: "N" - } - output_arg { - name: "output" - type: DT_STRING - } - attr { - name: "N" - type: "int" - has_minimum: true - minimum: 1 - } - attr { - name: "separator" - type: "string" - default_value { - s: "" - } - } - } - op { - name: "Sub" - input_arg { - name: "x" - type_attr: "T" - } - input_arg { - name: "y" - type_attr: "T" - } - output_arg { - name: "z" - type_attr: "T" - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - type: DT_UINT8 - type: DT_INT8 - type: DT_UINT16 - type: DT_INT16 - type: DT_INT32 - type: DT_INT64 - type: DT_COMPLEX64 - type: DT_COMPLEX128 - } - } - } - } - op { - name: "Switch" - input_arg { - name: "data" - type_attr: "T" - } - input_arg { - name: "pred" - type: DT_BOOL - } - output_arg { - name: "output_false" - type_attr: "T" - } - output_arg { - name: "output_true" - type_attr: "T" - } - attr { - name: "T" - type: "type" - } - } - op { - name: "VariableV2" - output_arg { - name: "ref" - type_attr: "dtype" - is_ref: true - } - attr { - name: "shape" - type: "shape" - } - attr { - name: "dtype" - type: "type" - } - attr { - name: "container" - type: "string" - default_value { - s: "" - } - } - attr { - name: "shared_name" - type: "string" - default_value { - s: "" - } - } - is_stateful: true - } - } - tags: "serve" - tensorflow_version: "1.4.1" - tensorflow_git_version: "v1.4.0-19-ga52c8d9" - } - graph_def { - node { - name: "X" - op: "Placeholder" - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "shape" - value { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - node { - name: "y" - op: "Placeholder" - attr { - key: "_output_shapes" - value { - list { - shape { - unknown_rank: true - } - } - } - } - attr { - key: "dtype" - value { - type: DT_INT64 - } - } - attr { - key: "shape" - value { - shape { - unknown_rank: true - } - } - } - } - node { - name: "training/input" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_BOOL - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_BOOL - tensor_shape { - } - bool_val: false - } - } - } - } - node { - name: "training" - op: "PlaceholderWithDefault" - input: "training/input" - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_BOOL - } - } - attr { - key: "shape" - value { - shape { - } - } - } - } - node { - name: "xdrop/cond/Switch" - op: "Switch" - input: "training" - input: "training" - attr { - key: "T" - value { - type: DT_BOOL - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - shape { - } - } - } - } - } - node { - name: "xdrop/cond/switch_t" - op: "Identity" - input: "xdrop/cond/Switch:1" - attr { - key: "T" - value { - type: DT_BOOL - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - } - node { - name: "xdrop/cond/switch_f" - op: "Identity" - input: "xdrop/cond/Switch" - attr { - key: "T" - value { - type: DT_BOOL - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - } - node { - name: "xdrop/cond/pred_id" - op: "Identity" - input: "training" - attr { - key: "T" - value { - type: DT_BOOL - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - } - node { - name: "xdrop/cond/dropout/keep_prob" - op: "Const" - input: "^xdrop/cond/switch_t" - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_FLOAT - tensor_shape { - } - float_val: 0.5 - } - } - } - } - node { - name: "xdrop/cond/dropout/Shape/Switch" - op: "Switch" - input: "X" - input: "xdrop/cond/pred_id" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@X" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - } - node { - name: "xdrop/cond/dropout/Shape" - op: "Shape" - input: "xdrop/cond/dropout/Shape/Switch:1" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 2 - } - } - } - } - } - attr { - key: "out_type" - value { - type: DT_INT32 - } - } - } - node { - name: "xdrop/cond/dropout/random_uniform/min" - op: "Const" - input: "^xdrop/cond/switch_t" - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_FLOAT - tensor_shape { - } - float_val: 0.0 - } - } - } - } - node { - name: "xdrop/cond/dropout/random_uniform/max" - op: "Const" - input: "^xdrop/cond/switch_t" - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_FLOAT - tensor_shape { - } - float_val: 1.0 - } - } - } - } - node { - name: "xdrop/cond/dropout/random_uniform/RandomUniform" - op: "RandomUniform" - input: "xdrop/cond/dropout/Shape" - attr { - key: "T" - value { - type: DT_INT32 - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "seed" - value { - i: 0 - } - } - attr { - key: "seed2" - value { - i: 0 - } - } - } - node { - name: "xdrop/cond/dropout/random_uniform/sub" - op: "Sub" - input: "xdrop/cond/dropout/random_uniform/max" - input: "xdrop/cond/dropout/random_uniform/min" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - } - node { - name: "xdrop/cond/dropout/random_uniform/mul" - op: "Mul" - input: "xdrop/cond/dropout/random_uniform/RandomUniform" - input: "xdrop/cond/dropout/random_uniform/sub" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - } - node { - name: "xdrop/cond/dropout/random_uniform" - op: "Add" - input: "xdrop/cond/dropout/random_uniform/mul" - input: "xdrop/cond/dropout/random_uniform/min" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - } - node { - name: "xdrop/cond/dropout/add" - op: "Add" - input: "xdrop/cond/dropout/keep_prob" - input: "xdrop/cond/dropout/random_uniform" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - } - node { - name: "xdrop/cond/dropout/Floor" - op: "Floor" - input: "xdrop/cond/dropout/add" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - } - node { - name: "xdrop/cond/dropout/div" - op: "RealDiv" - input: "xdrop/cond/dropout/Shape/Switch:1" - input: "xdrop/cond/dropout/keep_prob" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - } - node { - name: "xdrop/cond/dropout/mul" - op: "Mul" - input: "xdrop/cond/dropout/div" - input: "xdrop/cond/dropout/Floor" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - } - node { - name: "xdrop/cond/Identity/Switch" - op: "Switch" - input: "X" - input: "xdrop/cond/pred_id" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@X" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - } - node { - name: "xdrop/cond/Identity" - op: "Identity" - input: "xdrop/cond/Identity/Switch" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - } - } - node { - name: "xdrop/cond/Merge" - op: "Merge" - input: "xdrop/cond/Identity" - input: "xdrop/cond/dropout/mul" - attr { - key: "N" - value { - i: 2 - } - } - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - shape { - } - } - } - } - } - node { - name: "outputs/kernel/Initializer/random_uniform/shape" - op: "Const" - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 2 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_INT32 - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_INT32 - tensor_shape { - dim { - size: 2 - } - } - tensor_content: "\020\003\000\000\n\000\000\000" - } - } - } - } - node { - name: "outputs/kernel/Initializer/random_uniform/min" - op: "Const" - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_FLOAT - tensor_shape { - } - float_val: -0.08692913502454758 - } - } - } - } - node { - name: "outputs/kernel/Initializer/random_uniform/max" - op: "Const" - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_FLOAT - tensor_shape { - } - float_val: 0.08692913502454758 - } - } - } - } - node { - name: "outputs/kernel/Initializer/random_uniform/RandomUniform" - op: "RandomUniform" - input: "outputs/kernel/Initializer/random_uniform/shape" - attr { - key: "T" - value { - type: DT_INT32 - } - } - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 784 - } - dim { - size: 10 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "seed" - value { - i: 0 - } - } - attr { - key: "seed2" - value { - i: 0 - } - } - } - node { - name: "outputs/kernel/Initializer/random_uniform/sub" - op: "Sub" - input: "outputs/kernel/Initializer/random_uniform/max" - input: "outputs/kernel/Initializer/random_uniform/min" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - } - node { - name: "outputs/kernel/Initializer/random_uniform/mul" - op: "Mul" - input: "outputs/kernel/Initializer/random_uniform/RandomUniform" - input: "outputs/kernel/Initializer/random_uniform/sub" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 784 - } - dim { - size: 10 - } - } - } - } - } - } - node { - name: "outputs/kernel/Initializer/random_uniform" - op: "Add" - input: "outputs/kernel/Initializer/random_uniform/mul" - input: "outputs/kernel/Initializer/random_uniform/min" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 784 - } - dim { - size: 10 - } - } - } - } - } - } - node { - name: "outputs/kernel" - op: "VariableV2" - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 784 - } - dim { - size: 10 - } - } - } - } - } - attr { - key: "container" - value { - s: "" - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "shape" - value { - shape { - dim { - size: 784 - } - dim { - size: 10 - } - } - } - } - attr { - key: "shared_name" - value { - s: "" - } - } - } - node { - name: "outputs/kernel/Assign" - op: "Assign" - input: "outputs/kernel" - input: "outputs/kernel/Initializer/random_uniform" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 784 - } - dim { - size: 10 - } - } - } - } - } - attr { - key: "use_locking" - value { - b: true - } - } - attr { - key: "validate_shape" - value { - b: true - } - } - } - node { - name: "outputs/kernel/read" - op: "Identity" - input: "outputs/kernel" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 784 - } - dim { - size: 10 - } - } - } - } - } - } - node { - name: "outputs/bias/Initializer/zeros" - op: "Const" - attr { - key: "_class" - value { - list { - s: "loc:@outputs/bias" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 10 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_FLOAT - tensor_shape { - dim { - size: 10 - } - } - float_val: 0.0 - } - } - } - } - node { - name: "outputs/bias" - op: "VariableV2" - attr { - key: "_class" - value { - list { - s: "loc:@outputs/bias" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 10 - } - } - } - } - } - attr { - key: "container" - value { - s: "" - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "shape" - value { - shape { - dim { - size: 10 - } - } - } - } - attr { - key: "shared_name" - value { - s: "" - } - } - } - node { - name: "outputs/bias/Assign" - op: "Assign" - input: "outputs/bias" - input: "outputs/bias/Initializer/zeros" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@outputs/bias" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 10 - } - } - } - } - } - attr { - key: "use_locking" - value { - b: true - } - } - attr { - key: "validate_shape" - value { - b: true - } - } - } - node { - name: "outputs/bias/read" - op: "Identity" - input: "outputs/bias" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@outputs/bias" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 10 - } - } - } - } - } - } - node { - name: "outputs/MatMul" - op: "MatMul" - input: "xdrop/cond/Merge" - input: "outputs/kernel/read" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 10 - } - } - } - } - } - attr { - key: "transpose_a" - value { - b: false - } - } - attr { - key: "transpose_b" - value { - b: false - } - } - } - node { - name: "outputs/BiasAdd" - op: "BiasAdd" - input: "outputs/MatMul" - input: "outputs/bias/read" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 10 - } - } - } - } - } - attr { - key: "data_format" - value { - s: "NHWC" - } - } - } - node { - name: "outputs/Const" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 1 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_FLOAT - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_FLOAT - tensor_shape { - dim { - size: 1 - } - } - float_val: 0.009999999776482582 - } - } - } - } - node { - name: "outputs/mul" - op: "Mul" - input: "outputs/Const" - input: "outputs/BiasAdd" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 10 - } - } - } - } - } - } - node { - name: "outputs/Maximum" - op: "Maximum" - input: "outputs/mul" - input: "outputs/BiasAdd" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: -1 - } - dim { - size: 10 - } - } - } - } - } - } - node { - name: "init" - op: "NoOp" - input: "^outputs/kernel/Assign" - input: "^outputs/bias/Assign" - } - node { - name: "save/Const" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_STRING - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_STRING - tensor_shape { - } - string_val: "model" - } - } - } - } - node { - name: "save/StringJoin/inputs_1" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_STRING - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_STRING - tensor_shape { - } - string_val: "_temp_6962088d414d471890a43f51e0ba56f9/part" - } - } - } - } - node { - name: "save/StringJoin" - op: "StringJoin" - input: "save/Const" - input: "save/StringJoin/inputs_1" - attr { - key: "N" - value { - i: 2 - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "separator" - value { - s: "" - } - } - } - node { - name: "save/num_shards" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_INT32 - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_INT32 - tensor_shape { - } - int_val: 1 - } - } - } - } - node { - name: "save/ShardedFilename/shard" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - attr { - key: "dtype" - value { - type: DT_INT32 - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_INT32 - tensor_shape { - } - int_val: 0 - } - } - } - } - node { - name: "save/ShardedFilename" - op: "ShardedFilename" - input: "save/StringJoin" - input: "save/ShardedFilename/shard" - input: "save/num_shards" - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - } - node { - name: "save/SaveV2/tensor_names" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 2 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_STRING - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_STRING - tensor_shape { - dim { - size: 2 - } - } - string_val: "outputs/bias" - string_val: "outputs/kernel" - } - } - } - } - node { - name: "save/SaveV2/shape_and_slices" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 2 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_STRING - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_STRING - tensor_shape { - dim { - size: 2 - } - } - string_val: "" - string_val: "" - } - } - } - } - node { - name: "save/SaveV2" - op: "SaveV2" - input: "save/ShardedFilename" - input: "save/SaveV2/tensor_names" - input: "save/SaveV2/shape_and_slices" - input: "outputs/bias" - input: "outputs/kernel" - attr { - key: "dtypes" - value { - list { - type: DT_FLOAT - type: DT_FLOAT - } - } - } - } - node { - name: "save/control_dependency" - op: "Identity" - input: "save/ShardedFilename" - input: "^save/SaveV2" - attr { - key: "T" - value { - type: DT_STRING - } - } - attr { - key: "_class" - value { - list { - s: "loc:@save/ShardedFilename" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - } - node { - name: "save/MergeV2Checkpoints/checkpoint_prefixes" - op: "Pack" - input: "save/ShardedFilename" - input: "^save/control_dependency" - attr { - key: "N" - value { - i: 1 - } - } - attr { - key: "T" - value { - type: DT_STRING - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 1 - } - } - } - } - } - attr { - key: "axis" - value { - i: 0 - } - } - } - node { - name: "save/MergeV2Checkpoints" - op: "MergeV2Checkpoints" - input: "save/MergeV2Checkpoints/checkpoint_prefixes" - input: "save/Const" - attr { - key: "delete_old_dirs" - value { - b: true - } - } - } - node { - name: "save/Identity" - op: "Identity" - input: "save/Const" - input: "^save/control_dependency" - input: "^save/MergeV2Checkpoints" - attr { - key: "T" - value { - type: DT_STRING - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - } - } - } - } - } - node { - name: "save/RestoreV2/tensor_names" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 1 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_STRING - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_STRING - tensor_shape { - dim { - size: 1 - } - } - string_val: "outputs/bias" - } - } - } - } - node { - name: "save/RestoreV2/shape_and_slices" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 1 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_STRING - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_STRING - tensor_shape { - dim { - size: 1 - } - } - string_val: "" - } - } - } - } - node { - name: "save/RestoreV2" - op: "RestoreV2" - input: "save/Const" - input: "save/RestoreV2/tensor_names" - input: "save/RestoreV2/shape_and_slices" - attr { - key: "_output_shapes" - value { - list { - shape { - unknown_rank: true - } - } - } - } - attr { - key: "dtypes" - value { - list { - type: DT_FLOAT - } - } - } - } - node { - name: "save/Assign" - op: "Assign" - input: "outputs/bias" - input: "save/RestoreV2" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@outputs/bias" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 10 - } - } - } - } - } - attr { - key: "use_locking" - value { - b: true - } - } - attr { - key: "validate_shape" - value { - b: true - } - } - } - node { - name: "save/RestoreV2_1/tensor_names" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 1 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_STRING - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_STRING - tensor_shape { - dim { - size: 1 - } - } - string_val: "outputs/kernel" - } - } - } - } - node { - name: "save/RestoreV2_1/shape_and_slices" - op: "Const" - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 1 - } - } - } - } - } - attr { - key: "dtype" - value { - type: DT_STRING - } - } - attr { - key: "value" - value { - tensor { - dtype: DT_STRING - tensor_shape { - dim { - size: 1 - } - } - string_val: "" - } - } - } - } - node { - name: "save/RestoreV2_1" - op: "RestoreV2" - input: "save/Const" - input: "save/RestoreV2_1/tensor_names" - input: "save/RestoreV2_1/shape_and_slices" - attr { - key: "_output_shapes" - value { - list { - shape { - unknown_rank: true - } - } - } - } - attr { - key: "dtypes" - value { - list { - type: DT_FLOAT - } - } - } - } - node { - name: "save/Assign_1" - op: "Assign" - input: "outputs/kernel" - input: "save/RestoreV2_1" - attr { - key: "T" - value { - type: DT_FLOAT - } - } - attr { - key: "_class" - value { - list { - s: "loc:@outputs/kernel" - } - } - } - attr { - key: "_output_shapes" - value { - list { - shape { - dim { - size: 784 - } - dim { - size: 10 - } - } - } - } - } - attr { - key: "use_locking" - value { - b: true - } - } - attr { - key: "validate_shape" - value { - b: true - } - } - } - node { - name: "save/restore_shard" - op: "NoOp" - input: "^save/Assign" - input: "^save/Assign_1" - } - node { - name: "save/restore_all" - op: "NoOp" - input: "^save/restore_shard" - } - versions { - producer: 24 - } - } - saver_def { - filename_tensor_name: "save/Const:0" - save_tensor_name: "save/Identity:0" - restore_op_name: "save/restore_all" - max_to_keep: 5 - sharded: true - keep_checkpoint_every_n_hours: 10000.0 - version: V2 - } - collection_def { - key: "cond_context" - value { - bytes_list { - value: "\n\024xdrop/cond/cond_text\022\024xdrop/cond/pred_id:0\032\025xdrop/cond/switch_t:0 \001*\241\004\n\003X:0\n\032xdrop/cond/dropout/Floor:0\n!xdrop/cond/dropout/Shape/Switch:1\n\032xdrop/cond/dropout/Shape:0\n\030xdrop/cond/dropout/add:0\n\030xdrop/cond/dropout/div:0\n\036xdrop/cond/dropout/keep_prob:0\n\030xdrop/cond/dropout/mul:0\n1xdrop/cond/dropout/random_uniform/RandomUniform:0\n\'xdrop/cond/dropout/random_uniform/max:0\n\'xdrop/cond/dropout/random_uniform/min:0\n\'xdrop/cond/dropout/random_uniform/mul:0\n\'xdrop/cond/dropout/random_uniform/sub:0\n#xdrop/cond/dropout/random_uniform:0\n\024xdrop/cond/pred_id:0\n\025xdrop/cond/switch_t:0\022(\n\003X:0\022!xdrop/cond/dropout/Shape/Switch:1" - value: "\n\026xdrop/cond/cond_text_1\022\024xdrop/cond/pred_id:0\032\025xdrop/cond/switch_f:0*\214\001\n\003X:0\n\034xdrop/cond/Identity/Switch:0\n\025xdrop/cond/Identity:0\n\024xdrop/cond/pred_id:0\n\025xdrop/cond/switch_f:0\022#\n\003X:0\022\034xdrop/cond/Identity/Switch:0" - } - } - } - collection_def { - key: "trainable_variables" - value { - bytes_list { - value: "\n\020outputs/kernel:0\022\025outputs/kernel/Assign\032\025outputs/kernel/read:02+outputs/kernel/Initializer/random_uniform:0" - value: "\n\016outputs/bias:0\022\023outputs/bias/Assign\032\023outputs/bias/read:02 outputs/bias/Initializer/zeros:0" - } - } - } - collection_def { - key: "variables" - value { - bytes_list { - value: "\n\020outputs/kernel:0\022\025outputs/kernel/Assign\032\025outputs/kernel/read:02+outputs/kernel/Initializer/random_uniform:0" - value: "\n\016outputs/bias:0\022\023outputs/bias/Assign\032\023outputs/bias/read:02 outputs/bias/Initializer/zeros:0" - } - } - } - signature_def { - key: "serving_default" - value { - inputs { - key: "x" - value { - name: "X:0" - dtype: DT_FLOAT - tensor_shape { - dim { - size: -1 - } - dim { - size: 784 - } - } - } - } - outputs { - key: "y" - value { - name: "outputs/Maximum:0" - dtype: DT_FLOAT - tensor_shape { - dim { - size: -1 - } - dim { - size: 10 - } - } - } - } - method_name: "tensorflow/serving/predict" - } - } -} diff --git a/model-integration/src/test/models/tensorflow/dropout/saved/variables/variables.data-00000-of-00001 b/model-integration/src/test/models/tensorflow/dropout/saved/variables/variables.data-00000-of-00001 Binary files differdeleted file mode 100644 index 000c9b3a7b5..00000000000 --- a/model-integration/src/test/models/tensorflow/dropout/saved/variables/variables.data-00000-of-00001 +++ /dev/null diff --git a/model-integration/src/test/models/tensorflow/dropout/saved/variables/variables.index b/model-integration/src/test/models/tensorflow/dropout/saved/variables/variables.index Binary files differdeleted file mode 100644 index 9492ef4bde2..00000000000 --- a/model-integration/src/test/models/tensorflow/dropout/saved/variables/variables.index +++ /dev/null |