# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with selector. If not, see <http://www.gnu.org/licenses/>.
+# along with svrt. If not, see <http://www.gnu.org/licenses/>.
import time
from torchvision import datasets, transforms, utils
-from _ext import svrt
+import svrt
labels = torch.LongTensor(12).zero_()
labels.narrow(0, 0, labels.size(0)//2).fill_(1)
x = svrt.generate_vignettes(4, labels)
+print('compression factor {:f}'.format(x.storage().size() / svrt.compress(x.storage()).size()))
+
x = x.view(x.size(0), 1, x.size(1), x.size(2))
x.div_(255)
torchvision.utils.save_image(x, 'example.png')
+
+print('Wrote example.png')