问题
I am making a chatbot that sends an HTTP request through ngrok to a local python file which runs a image recognition script using Tensorflow. The script will then return a string back to Twilio that will be sent back to the user.
The file runs until the end without error and all the debugging print statements printed the right things in my terminal. However, Twilio says I have an error 81014 and the string I returned isn't received my Twilio.
Some trial and error showed me that the following line is causing the error (it came from the label_image.py file in tensorflow)
with tf.Session(graph=graph) as sess:
results = sess.run(output_operation.outputs[0], {
input_operation.outputs[0]: t
})
I also noticed that many lines that I did not print is being printed in my terminal. I am not sure if there is a correlation in that. Here are some of the lines:
Optimizing fused batch norm node name: "import/module_apply_default/InceptionV3/InceptionV3/Mixed_6d/Branch_3/Conv2d_0b_1x1/BatchNorm/FusedBatchNorm"
op: "FusedBatchNorm"
input: "import/module_apply_default/InceptionV3/InceptionV3/Mixed_6d/Branch_3/Conv2d_0b_1x1/Conv2D"
input: "import/module_apply_default/InceptionV3/InceptionV3/Mixed_6d/Branch_3/Conv2d_0b_1x1/BatchNorm/Const"
input: "import/module/InceptionV3/Mixed_6d/Branch_3/Conv2d_0b_1x1/BatchNorm/beta"
input: "import/module/InceptionV3/Mixed_6d/Branch_3/Conv2d_0b_1x1/BatchNorm/moving_mean"
input: "import/module/InceptionV3/Mixed_6d/Branch_3/Conv2d_0b_1x1/BatchNorm/moving_variance"
device: "/job:localhost/replica:0/task:0/device:CPU:0"
attr {
key: "T"
value {
type: DT_FLOAT
}
}
attr {
key: "data_format"
value {
s: "NHWC"
}
}
attr {
key: "epsilon"
value {
f: 0.001
}
}
attr {
key: "is_training"
value {
b: false
}
}
Can anyone tell me why Twilio is failing?
来源:https://stackoverflow.com/questions/51407854/unable-to-send-message-back-to-twilio-after-running-tensorflow