Skip to content

Instantly share code, notes, and snippets.

@arunm8489
Created June 4, 2020 05:46
Show Gist options
  • Save arunm8489/740b54adfb6862d73aa87900dbe23044 to your computer and use it in GitHub Desktop.
Save arunm8489/740b54adfb6862d73aa87900dbe23044 to your computer and use it in GitHub Desktop.
fp = open(weightfile, "rb")
#The first 5 values are header information
# 1. Major version number
# 2. Minor Version Number
# 3. Subversion number
# 4,5. Images seen by the network (during training)
header = np.fromfile(fp, dtype = np.int32, count = 5)
weights = np.fromfile(fp, dtype = np.float32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment