I'm trying to use Openscale to check the explainibiltiy of my image classification model(Keras:2.2.4、tensorflow:1.11) So far, I have finished the configuration and able to see the explainability of my first scoring request. However, when I tried to send a new request, the record was sent to PayloadError table with error message as title. Am I sending a wrong payload record?
the part of my code is as below:
imagefile='test_image\\fusion\\Black-sample05-basyo1-muki14_6_3.JPG'
img = cv2.imread(imagefile)
img_resized = cv2.resize(img,(104, 104))
print(img_resized .shape)
im = np.array(img_resized )
im_data = np.uint8(im)
im_data2 = im_data[:,:,:3]
print( 'shape2: ', im_data2.shape)
im_data3 = im_data2.tolist()
print(im_data3)
header = {'Content-Type': 'application/json', 'Authorization': 'Bearer ' + iam_token}
payload_scoring = {"values": [im_data3] }
scoring_url="https://us-south.ml.cloud.ibm.com/v3/wml_instances/564d5095-31bf-4b1d-98e3-114cf2b2f409/deployments/3a60a744-dadf-481f-b0f7-512963cc8ce3/online"
response_scoring = requests.post(scoring_url, json=payload_scoring, headers=header)
print("Scoring response")
print(json.loads(response_scoring.text))
>{'fields': ['prediction', 'prediction_classes', 'probability'], 'values': [[[1.0, 0.0], 0, [1.0, 0.0]]]}