This is the code that I am using to generate random biases and storing it as a list of array. I have tried reading back the stored CSV file but the format is no longer a list of arrays. Can somebody tell me how I can retrieve back the baizes in the same format? I am not trying to sort the list, i just want to read back the CSV file and retain the original formatting. Thanks in advance!
import csv
import numpy as np
sizes = [784, 30, 10]
biases = [np.random.randn(y, 1) for y in sizes[1:]]
#weights = [np.random.randn(y, x) for x, y in zip(sizes[:-1], sizes[1:])]
biasfile0 = open('C:/Users/Sharath Talikatte/Desktop/Neural
Networks/bias0.csv', 'w', encoding='utf-8')
with biasfile0:
writerb0 = csv.writer(biasfile0)
writerb0.writerow(biases[0])
biasfile1 = open('C:/Users/Sharath Talikatte/Desktop/Neural
Networks/bias1.csv', 'w', encoding='utf- 8')
with biasfile1:
writerb1 = csv.writer(biasfile1)
writerb1.writerow(biases[1])