Skip to content

Instantly share code, notes, and snippets.

@abhinavagarwalla
abhinavagarwalla / convert_imagenet_small.py
Created August 1, 2020 19:18
Convert ImageNet-Small (64x64) into the same format as ImageNet (as an ImageFolder)
import torch
from torchvision.datasets import CIFAR10
from torchvision import transforms
import os
import shutil
import pickle
from PIL import Image
from skimage.io import imsave
import numpy as np
from tqdm import tqdm
from IPython.parallel import Client, RemoteError, interactive
from dalek.parallel.launcher import BaseLauncher, simple_worker
from dalek.parallel.parameter_collection import apply_dict
import numpy as np
import copy
try:
rc = Client()
except IOError:
@abhinavagarwalla
abhinavagarwalla / BLAS_routines
Last active August 29, 2015 14:09
Routines in NMatrix
Already Present:
Level 1:
SWAP
SCAL
ROTG
ROT
NRM2
I_AMAX
ASUM
-- Using system's malloc
-- Could NOT find MOSEK (missing: MOSEK_DIR MOSEK_INCLUDE_DIR MOSEK_LIBRARY)
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Could NOT find GLPK (missing: GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_PROPER_VERSION_FOUND)
-- Could NOT find CPLEX (missing: CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
-- Found Arpack : /usr/lib/libarpack.so
-- Could NOT find OPENCL (missing: OPENCL_LIBRARY OPENCL_INCLUDE_DIR)
-- Could NOT find ViennaCL (missing: VIENNACL_INCLUDE_DIR OPENCL_INCLUDE_DIRS OPENCL_LIBRARIES) (Required is at least version "1.5.0")
-- checking for one of the modules 'libColPack>=1.0.9;ColPack>=1.0.9'
58% tests passed, 339 tests failed out of 803
Total Test time (real) = 125.64 sec
The following tests FAILED:
1 - integration-python_modular-tester-distribution_histogram_modular (Failed)
3 - integration-python_modular-tester-distance_tanimoto_modular (Failed)
5 - integration-python_modular-tester-kernel_sparse_poly_modular (Failed)
6 - integration-python_modular-tester-classifier_svmsgd_modular (Failed)
7 - integration-python_modular-tester-converter_diffusionmaps_modular (Failed)
[ 86%] [ 86%] [ 86%] [ 86%] [ 87%] Building CXX object tests/unit/CMakeFiles/shogun-unit-test.dir/mathematics/ajd/QDiag_unittest.cc.o
Building CXX object tests/unit/CMakeFiles/shogun-unit-test.dir/mathematics/ajd/JADiagOrth_unittest.cc.o
Building CXX object tests/unit/CMakeFiles/shogun-unit-test.dir/mathematics/ajd/JADiag_unittest.cc.o
Building CXX object tests/unit/CMakeFiles/shogun-unit-test.dir/mathematics/ajd/JediDiag_unittest.cc.o
[ 87%] Building CXX object tests/unit/CMakeFiles/shogun-unit-test.dir/mathematics/ajd/UWedge_unittest.cc.o
[ 87%] [ 87%] Built target splitting_stratified_crossvalidation
Built target mathematics_lapack
Building CXX object tests/unit/CMakeFiles/shogun-unit-test.dir/mathematics/Math_unittest.cc.o
/home/abhinav/shogun/tests/unit/mathematics/Statistics_unittest.cc:378:5: error: expected constructor, destructor, or type conversion before ‘(’ token
TEST(Statistics, chi2_cdf)