{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Generate CIFAR10 FID statistics\n\n### Step 1: Extract the train images to a directory","metadata":{}},{"cell_type":"code","source":"!pip install pytorch-fid\n!7z x /kaggle/input/cifar-10/train.7z -o/kaggle/working/train","metadata":{"execution":{"iopub.status.busy":"2023-05-13T21:17:21.984095Z","iopub.execute_input":"2023-05-13T21:17:21.984674Z","iopub.status.idle":"2023-05-13T21:17:47.943315Z","shell.execute_reply.started":"2023-05-13T21:17:21.984618Z","shell.execute_reply":"2023-05-13T21:17:47.941773Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Step 2: Generate the npz file ","metadata":{}},{"cell_type":"code","source":"!python -m pytorch_fid --save-stats /kaggle/working/train/train /kaggle/working/cifar10stats.npz","metadata":{"execution":{"iopub.status.busy":"2023-05-13T21:15:53.579674Z","iopub.execute_input":"2023-05-13T21:15:53.580122Z","iopub.status.idle":"2023-05-13T21:15:58.240045Z","shell.execute_reply.started":"2023-05-13T21:15:53.580083Z","shell.execute_reply":"2023-05-13T21:15:58.238714Z"},"trusted":true},"execution_count":null,"outputs":[]}]}