File tree Expand file tree Collapse file tree 9 files changed +42
-22
lines changed Expand file tree Collapse file tree 9 files changed +42
-22
lines changed Original file line number Diff line number Diff line change 2727
2828import tensorflow_compression as tfc
2929
30- from .helpers import ModelMode
30+ from hific .helpers import ModelMode
3131
3232SCALES_MIN = 0.11
3333SCALES_MAX = 256
Original file line number Diff line number Diff line change 1414# ==============================================================================
1515"""Configurations for HiFiC."""
1616
17- from . import helpers
17+ from hific import helpers
1818
1919
2020_CONFIGS = {
Original file line number Diff line number Diff line change 2929import tensorflow .compat .v1 as tf
3030import tensorflow_compression as tfc
3131
32- from . import configs
33- from . import helpers
34- from . import model
32+ from hific import configs
33+ from hific import helpers
34+ from hific import model
3535
3636
3737# Show custom tf.logging calls.
Original file line number Diff line number Diff line change 2020import numpy as np
2121import tensorflow .compat .v1 as tf
2222
23- from . import configs
24- from . import helpers
25- from . import model
26- from . import train
23+ from hific import configs
24+ from hific import helpers
25+ from hific import model
26+ from hific import train
2727
2828
2929class FakeHiFiC (model .HiFiC ):
Original file line number Diff line number Diff line change 2121import tensorflow .compat .v1 as tf
2222import tensorflow_datasets as tfds
2323
24- from . import archs
25- from . import helpers
26- from .helpers import ModelMode
27- from .helpers import ModelType
28- from .helpers import TFDSArguments
24+ from hific import archs
25+ from hific import helpers
26+ from hific .helpers import ModelMode
27+ from hific .helpers import ModelType
28+ from hific .helpers import TFDSArguments
2929
3030
3131# How many dataset preprocessing processes to use.
Original file line number Diff line number Diff line change 1919
2020import tensorflow .compat .v1 as tf
2121
22- from . import configs
23- from . import helpers
24- from . import model
22+ from hific import configs
23+ from hific import helpers
24+ from hific import model
2525
2626# Show custom tf.logging calls.
2727tf .logging .set_verbosity (tf .logging .INFO )
Original file line number Diff line number Diff line change 55import tensorflow .compat .v2 as tf
66import tensorflow_probability as tfp
77import tensorflow_compression as tfc
8- from . import compression_model
8+ from toy_sources import compression_model
99
1010tfpd = tfp .distributions
1111
Original file line number Diff line number Diff line change 2525 " This code requires tensorflow-compression v2.x.\n "
2626 ]
2727 },
28+ {
29+ "cell_type" : " code" ,
30+ "metadata" : {
31+ "cellView" : " form" ,
32+ "id" : " wdA5NUZ-fSxG"
33+ },
34+ "source" : [
35+ " #@title Dependencies for Colab\n " ,
36+ " \n " ,
37+ " # Run this cell to install the necessary dependencies when running the notebook\n " ,
38+ " # directly in a Colaboratory hosted runtime from Github.\n " ,
39+ " \n " ,
40+ " %tensorflow_version 2.x\n " ,
41+ " !pip install tensorflow-compression>=2.0\n " ,
42+ " ![[ -e tfc ]] || git clone https://github.com/tensorflow/compression tfc\n " ,
43+ " %cd tfc/models\n "
44+ ],
45+ "execution_count" : null ,
46+ "outputs" : []
47+ },
2848 {
2949 "cell_type" : " code" ,
3050 "execution_count" : null ,
88108 "source" : [
89109 " #@title Source definitions\n " ,
90110 " \n " ,
91- " from . import sawbridge\n " ,
111+ " from toy_sources import sawbridge\n " ,
92112 " \n " ,
93113 " \n " ,
94114 " def _rotation_2d(degrees):\n " ,
138158 " \n " ,
139159 " import pywt\n " ,
140160 " import scipy\n " ,
141- " from . import ntc\n " ,
142- " from . import vecvq\n " ,
161+ " from toy_sources import ntc\n " ,
162+ " from toy_sources import vecvq\n " ,
143163 " \n " ,
144164 " \n " ,
145165 " def _get_activation(activation, dtype):\n " ,
Original file line number Diff line number Diff line change 11"""Variational entropy-constrained vector quantization."""
22
33import tensorflow .compat .v2 as tf
4- from . import compression_model
4+ from toy_sources import compression_model
55
66
77class VECVQModel (compression_model .CompressionModel ):
You can’t perform that action at this time.
0 commit comments