MCPcopy Create free account
hub / github.com/clab/dynet / __init__

Method __init__

examples/python-utils/util.py:22–24  ·  view source on GitHub ↗
(self, fname)

Source from the content-addressed store, hash-verified

20#Use it exactly as the regular CorpusReader from the rnnlm.py
21class FastCorpusReader:
22 def __init__(self, fname):
23 self.fname = fname
24 self.f = open(fname, 'rb')
25 def __iter__(self):
26 #This usage of mmap is for a Linux\OS-X
27 #For Windows replace prot=mmap.PROT_READ with access=mmap.ACCESS_READ

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected