<jupyter_start><jupyter_text>Pick an example to test if load.cc works<jupyter_code># -- inputs
X_test[0]
# -- predicted output (using Keras)
yhat[0]<jupyter_output><empty_output><jupyter_text>Inspect the protobuf containing the model's architecture and logic<jupyter_code>from tensorflow.core.framework import graph_pb2

# -- read in the graph
f = open("models/graph.pb", "rb")
graph_def = graph_pb2.GraphDef()
graph_def.ParseFromString(f.read())
import tensorflow as tf
# -- actually import the graph described by graph_def
tf.import_graph_def(graph_def, name = '')
for node in graph_def.node:
    print node.name<jupyter_output>Placeholder
dense_W/initial_value
dense_W
dense_W/Assign
dense_W/read
dense_b/initial_value
dense_b
dense_b/Assign
dense_b/read
dense_W_1/initial_value
dense_W_1
dense_W_1/Assign
dense_W_1/read
dense_b_1/initial_value
dense_b_1
dense_b_1/Assign
dense_b_1/read
Variable/initial_value
Variable
Variable/Assign
Variable/read
Variable_1/initial_value
Variable_1
Variable_1/Assign
Variable_1/read
Variable_2/initial_value
Variable_2
Variable_2/Assign
Variable_2/read
Variable_3/initial_value
Variable_3
Variable_3/Assign
Variable_3/read
MatMul
add
Neg
Relu
Relu_1
Const
mul
sub
MatMul_1
add_1
Sigmoid
MatMul_2
add_2
Neg_1
Relu_2
Relu_3
Const_1
mul_1
sub_1
MatMul_3
add_3
Sigmoid_1
Placeholder_1
Placeholder_2
Cast/x
Cast_1/x
clip_by_value/Minimum
clip_by_value
sub_2/x
sub_2
div
Log
logistic_loss/Relu
logistic_loss/mul
logistic_loss/sub
logistic_loss/Abs
logistic_loss/Neg
logistic_loss/Exp
logistic_loss/add/x
logistic_loss/add
logistic_loss/Log
logistic_loss
Mean/reduction_indices
Mean
Mean_1/reductio[...]
{'fraction_non_alphanumeric': 0.0691131498470948, 'fraction_numerical': 0.02691131498470948, 'mean_word_length': 6.79047619047619, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '427491', 'license': 'MIT', 'n_tokens_mistral': 667, 'n_tokens_neox': 641, 'n_words': 132, 'path': 'TF/DummyNet.ipynb', 'repo_name': 'mickypaganini/IPRNN', 'size': '1635'}