reductionista commented on a change in pull request #440: DL: Update training_preprocessor_dl to use bytea URL: https://github.com/apache/madlib/pull/440#discussion_r322485405
########## File path: src/ports/postgres/modules/deep_learning/test/input_data_preprocessor.sql_in ########## @@ -121,10 +115,10 @@ SELECT training_preprocessor_dl( ); -- Test that indepdendent vars get divided by 5, by verifying min value goes from 1 to 0.2, and max value from 233 to 46.6 -SELECT assert(relative_error(MIN(x),0.2) < 0.00001, 'Independent var not normalized properly!') FROM (SELECT UNNEST(independent_var) as x FROM data_preprocessor_input_batch) a; -SELECT assert(relative_error(MAX(x),46.6) < 0.00001, 'Independent var not normalized properly!') FROM (SELECT UNNEST(independent_var) as x FROM data_preprocessor_input_batch) a; +SELECT assert(relative_error(MIN(x),0.2) < 0.00001, 'Independent var not normalized properly!') FROM (SELECT UNNEST(convert_bytea_to_real_array(independent_var)) as x FROM data_preprocessor_input_batch) a; +SELECT assert(relative_error(MAX(x),46.6) < 0.00001, 'Independent var not normalized properly!') FROM (SELECT UNNEST(convert_bytea_to_real_array(independent_var)) as x FROM data_preprocessor_input_batch) a; -- Test that 1-hot encoded array is of length 16 (num_classes) -SELECT assert(array_upper(dependent_var, 2) = 16, 'Incorrect one-hot encode dimension with num_classes') FROM +SELECT assert(dependent_var_shape = '[1:3][1:16]', 'Incorrect one-hot encode dimension with num_classes') FROM Review comment: See above ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
