KeremTurgutlu / self_supervised

Implementation of popular SOTA self-supervised learning algorithms as Fastai Callbacks.
Apache License 2.0
318 stars 33 forks source link

SupCon is missing in python package but exists in github #83

Open liorgreenb opened 2 years ago

liorgreenb commented 2 years ago

Describe the bug SupCon module doesn't exist in pip installation, nor in github release archive.

Although it does exist in github and the docs still exist.

To Reproduce Steps to reproduce the behavior (github):

  1. Download latest version from github https://github.com/KeremTurgutlu/self_supervised/archive/refs/tags/v.1.0.4.zip
  2. supcon.py does not exist under self_supervised/vision/

Steps to reproduce the behavior (pip):

  1. pip install self_supervised (Successfully installed self-supervised-1.0.4)
  2. Run in python
    from self_supervised.vision.supcon import *

Expected behavior Module should be loaded (like in the docs)

Error with full stack trace

Place between these lines with triple backticks:

In [1]: from self_supervised.vision.supcon import *
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Input In [1], in <module>
----> 1 from self_supervised.vision.supcon import *

ModuleNotFoundError: No module named 'self_supervised.vision.supcon'

In [2]: 

Additional context I was following the instructions from https://keremturgutlu.github.io/self_supervised/16%20-%20supcon.html

liorgreenb commented 2 years ago

I ran the SupCon's colab (while replacing the installation with a github repo installation) and received the next error:

TypeError: no implementation found for 'torch.nn.functional.cross_entropy' on types that implement __torch_function__: [<class 'fastai.torch_core.TensorImage'>, <class 'fastai.torch_core.TensorCategory'>]

I'm guessing it may be connected and maybe SupCon is WIP?