In [ ]:
import numpy as np
from matplotlib import pyplot as plt
In [ ]:
infile = open("./AlexNetDump.txt")
In [ ]:
# discard first 3 lines, containing '\n',
# 'ce=CrossEntropyWithSoftmax ( labels , OutputNodes.z ) \n'
# 'conv1.b=LearnableParameter [1,64] learningRateMultiplier=1.000000 NeedsGradient=true \n'
# first entry is conv1 layer bias values
for i in range(3):
infile.readline()
In [ ]:
txtline = infile.readline()
a = txtline.split()
conv1_bias = []
for i in range(64):
conv1_bias.append(float(a[i]))
conv1_bias_matrix = np.matrix(conv1_bias).reshape(8,8)
In [ ]:
conv1_bias_matrix
In [ ]:
txtline = infile.readline()
a = txtline.split()
conv1_w = []
for i in range(363):
conv1_bias.append(float(a[i])
conv1_w_matrix = np.array(conv1_bias).reshape(3, 11, 11)
In [ ]:
txtline
In [ ]:
plt.imshow(c)
plt.show()
In [ ]:
txtline1 = infile.readline()
txtline1
In [ ]: