The large Kaggle* Display Advertising Challenge Dataset will be used. The data is from Criteo and has a field indicating if an ad was clicked (1) or not (0), along with integer and categorical features.
Download large Kaggle Display Advertising Challenge Dataset from Criteo Labs.
- Download the large version of evaluation dataset from: https://storage.googleapis.com/dataset-uploader/criteo-kaggle/large_version/eval.csv
- Download the large version of train dataset from: https://storage.googleapis.com/dataset-uploader/criteo-kaggle/large_version/train.csv
Follow the instructions to convert the downloaded dataset to tfrecords using preprocess_csv_tfrecords.py:
- Store the path to
mkdir dataset cd /home/<user>/dataset
Copy the eval.csv and test.csv into your current working directory
- Launch Docker*
cd /home/<user>/dataset docker run -it --privileged -u root:root \ --volume /home/<user>/dataset:/dataset \ intel/recommendation:tf-latest-wide-deep-large-ds-fp32-inference \ /bin/bash
- Now run the data preprocessing step:
cd /dataset python /workspace/wide-deep-large-ds-fp32-inference/models/recommendation/tensorflow/wide_deep_large_ds/dataset/preprocess_csv_tfrecords.py \ --inputcsv-datafile eval.csv \ --calibrationcsv-datafile train.csv \ --outputfile-name preprocessed_eval
Now preprocessed eval dataset will be stored as eval_preprocessed_eval.tfrecords in /home//dataset directory.
- Exit out of Docker once the dataset preprocessing completes.
DATASET_DIR to point to this directory when running Wide & Deep using a large dataset:
Quick Start Scripts
||Runs online inference (
||Measures the model accuracy (
To run on bare metal, the following prerequisites must be installed in your environment:
- Python* 3
After installing the prerequisites, download and untar the model package. Set environment variables for the path to your
DATASET_DIR and an
OUTPUT_DIR where log files will be written, then run a quickstart script.
DATASET_DIR=<path to the dataset> OUTPUT_DIR=<directory where log files will be written> wget https://storage.googleapis.com/intel-optimized-tensorflow/models/v2_3_0/wide-deep-large-ds-fp32-inference.tar.gz tar -xzf wide-deep-large-ds-fp32-inference.tar.gz cd wide-deep-large-ds-fp32-inference
- Running inference to check accuracy:
- Running online inference: Set
NUM_OMP_THREADSfor tunning the hyperparameter
NUM_OMP_THREADS=1 quickstart/fp32_online_inference.sh \ --num-intra-threads 1 --num-inter-threads 1
Documentation and Sources
LEGAL NOTICE: By accessing, downloading or using this software and any required dependent software (the “Software Package”), you agree to the terms and conditions of the software license agreements for the Software Package, which may also include notices, disclaimers, or license terms for third party software included with the Software Package. Please refer to the license file for additional details.
Related Containers and Solutions
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.