MCPcopy Create free account
hub / github.com/BVLC/caffe / getFilenames

Function getFilenames

python/caffe/test/test_draw.py:9–24  ·  view source on GitHub ↗

Yields files in the source tree which are Net prototxts.

()

Source from the content-addressed store, hash-verified

7from caffe.proto import caffe_pb2
8
9def getFilenames():
10 """Yields files in the source tree which are Net prototxts."""
11 result = []
12
13 root_dir = os.path.abspath(os.path.join(
14 os.path.dirname(__file__), '..', '..', '..'))
15 assert os.path.exists(root_dir)
16
17 for dirname in ('models', 'examples'):
18 dirname = os.path.join(root_dir, dirname)
19 assert os.path.exists(dirname)
20 for cwd, _, filenames in os.walk(dirname):
21 for filename in filenames:
22 filename = os.path.join(cwd, filename)
23 if filename.endswith('.prototxt') and 'solver' not in filename:
24 yield os.path.join(dirname, filename)
25
26
27class TestDraw(unittest.TestCase):

Callers 1

test_draw_netMethod · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected