Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility for torch==1.12.1 #55

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

sieu-n
Copy link
Contributor

@sieu-n sieu-n commented Nov 8, 2022

I checked that this works for recent versions(torch==1.12.1, torchvision==0.13.1) and old versions (torch==1.3.1, torchvision==0.4.2).

As mentioned in #14 , I made it backward-compatible with previous versions.

@sieu-n
Copy link
Contributor Author

sieu-n commented Nov 8, 2022

Code to quick test in COLAB:

!git clone https://github.com/krenerd/RepDistiller
%cd RepDistiller

!sh scripts/fetch_pretrained_teachers.sh
!pip install tensorboard_logger

!python train_student.py \
--path_t ./save/models/resnet32x4_vanilla/ckpt_epoch_240.pth \
--distill kd \
--model_s resnet8x4 \
-r 0.1 \
-a 0.9 \
-b 0 \
--trial 1



# backward compatibility
!pip install torchvision==0.4.2 
!python train_student.py \
--path_t ./save/models/resnet32x4_vanilla/ckpt_epoch_240.pth \
--distill kd \
--model_s resnet8x4 \
-r 0.1 \
-a 0.9 \
-b 0 \
--trial 1

@sieu-n sieu-n changed the title Compatibi Compatibility for torch==1.12.1 Nov 8, 2022
@HobbitLong HobbitLong merged commit b84f547 into HobbitLong:master Oct 16, 2023
@HobbitLong
Copy link
Owner

Thank you @sieu-n for the pull-request, Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants