Hello @mohit7,
PyTorchAndroid with setNumThreads was published only in nightly builds(they are published from master branch), it will be in stable only with 1.4 release (January)
I rechecked our sonatype nightlies:
The latest published artifact is https://oss.sonatype.org/service/local/repositories/snapshots/content/org/pytorch/pytorch_android/1.4.0-SNAPSHOT/pytorch_android-1.4.0-20191219.100544-76.aar 4
It contains PyTorchAndroid.class in classes.jar with setNumThreads
Just to check your gradle setup to use nightlies:
repositories {
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }
}

dependencies {
    ...
    implementation 'org.pytorch:pytorch_android:1.4.0-SNAPSHOT'
    implementation 'org.pytorch:pytorch_android_torchvision:1.4.0-SNAPSHOT'
    ...
}

You might need key --refresh-dependencies to force update of the dependencies if your gradle cache config is very long.
Let me know if you have any problems with it.