|
|
|
@ -117,8 +117,10 @@ def test():
|
|
|
|
|
|
|
|
|
|
return reader
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def fluid_model():
|
|
|
|
|
parameter_tar = paddle.dataset.common.download(FLUID_URL_MODEL, 'uci_housing', FLUID_MD5_MODEL, 'fit_a_line.fluid.tar')
|
|
|
|
|
parameter_tar = paddle.dataset.common.download(
|
|
|
|
|
FLUID_URL_MODEL, 'uci_housing', FLUID_MD5_MODEL, 'fit_a_line.fluid.tar')
|
|
|
|
|
|
|
|
|
|
tar = tarfile.TarFile(parameter_tar, mode='r')
|
|
|
|
|
dirpath = tempfile.mkdtemp()
|
|
|
|
@ -126,6 +128,7 @@ def fluid_model():
|
|
|
|
|
|
|
|
|
|
return dirpath
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def predict_reader():
|
|
|
|
|
"""
|
|
|
|
|
It returns just one tuple data to do inference.
|
|
|
|
@ -135,12 +138,13 @@ def predict_reader():
|
|
|
|
|
"""
|
|
|
|
|
global UCI_TEST_DATA
|
|
|
|
|
load_data(paddle.dataset.common.download(URL, 'uci_housing', MD5))
|
|
|
|
|
return (UCI_TEST_DATA[0][:-1],)
|
|
|
|
|
return (UCI_TEST_DATA[0][:-1], )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def fetch():
|
|
|
|
|
paddle.dataset.common.download(URL, 'uci_housing', MD5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def convert(path):
|
|
|
|
|
"""
|
|
|
|
|
Converts dataset to recordio format
|
|
|
|
|