YAD2K icon indicating copy to clipboard operation
YAD2K copied to clipboard

how to use .weights file and what's meaning?

Open quliang93 opened this issue 5 years ago • 0 comments

Hi, guys: It's really hard to understand these codes below, I mean , if we can't see .weights, how can I parse hyper-parameters from .weights? by the way, what is major? minor? revision? and why read(12)? major, minor, revision = np.ndarray(shape=(3, ), dtype='int32', buffer=weights_file.read(12)) if (major*10+minor)>=2 and major<1000 and minor<1000: seen = np.ndarray(shape=(1,), dtype='int64', buffer=weights_file.read(8)) else: seen = np.ndarray(shape=(1,), dtype='int32', buffer=weights_file.read(4)) print('Weights Header: ', major, minor, revision, seen)

Thanks a lot!

quliang93 avatar Dec 02 '18 11:12 quliang93