In [8]:
import os
import json
import requests
import numpy as np
np.set_printoptions(threshold=np.nan)
import cv2
You can specify a directory on the host computer that can be accessed within your script. This is good when:
To enable this feature, you'll need to specify the following in each of your {target}.compute file:
In [11]:
# this folder maps to the nativeSharedDirectory variable specified
# in the {target}.compute aml_config file
base_directory = os.environ['AZUREML_NATIVE_SHARE_DIRECTORY']
os.chdir(base_directory)
os.getcwd()
Out[11]:
In [12]:
%ls
In [23]:
path_to_image = base_directory + "mnist_png/testing/7/0.png"
img_width, img_height = 28, 28
In [24]:
img = cv2.imread(path_to_image)
#img = cv2.resize(img, (img_width, img_height)
In [25]:
path_to_image
Out[25]:
In [ ]: