Commit b28cfa8a authored by Yuxin Wu's avatar Yuxin Wu

update

parent 4ac2e22b
......@@ -24,7 +24,7 @@ You can use this predicate to choose a different code path in inference mode.
## Inference After Training: What Tensorpack Does
Tensorpack provides some small tools to do the most basic types of inference for demo purposes.
Tensorpack only provides some small tools to do the most basic types of inference for demo purposes.
You can use them but
__these approaches are often suboptimal and may fail__.
They may often be inefficient or lack functionalities you need.
......
......@@ -125,6 +125,6 @@ Performance in [Detectron](https://github.com/facebookresearch/Detectron/) can b
Note that our training strategy is slightly different: we enable cascade throughout the entire training.
As far as I know, this model is the __best open source TF model__ on COCO dataset.
## Other Datasets / Implementation Details / Speed:
## Use Custom Datasets / Implementation Details / Speed:
See [BALLOON.md](BALLOON.md) and [NOTES.md](NOTES.md) for more details.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import tempfile
import numpy as np
import os
import unittest
......@@ -60,26 +61,38 @@ class SerializerTest(unittest.TestCase):
print(error_msg)
def test_lmdb(self):
self.run_write_read_test('test.lmdb', LMDBSerializer,
with tempfile.TemporaryDirectory() as f:
self.run_write_read_test(
os.path.join(f, 'test.lmdb'),
LMDBSerializer,
{}, {},
{}, {'shuffle': False},
'Skip test_lmdb, no lmdb available')
def test_tfrecord(self):
self.run_write_read_test('test.tfrecord', TFRecordSerializer,
with tempfile.TemporaryDirectory() as f:
self.run_write_read_test(
os.path.join(f, 'test.tfrecord'),
TFRecordSerializer,
{}, {},
{}, {'size': 32},
'Skip test_tfrecord, no tensorflow available')
def test_numpy(self):
self.run_write_read_test('test.npz', NumpySerializer,
with tempfile.TemporaryDirectory() as f:
self.run_write_read_test(
os.path.join(f, 'test.npz'),
NumpySerializer,
{}, {},
{}, {'shuffle': False},
'Skip test_numpy, no numpy available')
def test_hdf5(self):
args = [['label', 'image']]
self.run_write_read_test('test.h5', HDF5Serializer,
with tempfile.TemporaryDirectory() as f:
self.run_write_read_test(
os.path.join(f, 'test.h5'),
HDF5Serializer,
args, {},
args, {'shuffle': False},
'Skip test_hdf5, no h5py available')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment