Skip to content

Commit

Permalink
fix: auto fetch tinynn
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnL4 committed Feb 5, 2025
1 parent ea0ded7 commit 12c09ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ data/
*.npy

# datasets
datasets/
datasets/

# quantization
out/
6 changes: 6 additions & 0 deletions tools/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

sys.path.insert(0, osp.dirname(osp.dirname(osp.abspath(__file__))))

try:
import tinynn
except ModuleNotFoundError:
import subprocess
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'git+https://github.com/alibaba/TinyNeuralNetwork.git'])

from tinynn.graph.quantization.quantizer import QATQuantizer
from tinynn.util.train_util import AverageMeter
from tinynn.graph.tracer import model_tracer
Expand Down

0 comments on commit 12c09ce

Please sign in to comment.