Attributeerror: 'list' Object Has No Attribute 't'
I have been trying to implement a neural network in python that uses back propagation and keep getting the above error. How can I go about eliminating it. The code runs for one epo
Solution 1:
X is a list. You can see that by typing type(X). And lists do not have a transpose method. You want an array, so replace X = [0.4, 0.7] with:
X = np.array([0.4, 0.7])
Oh and btw.: A transpose of X = np.array([0.4, 0.7]) will be the same as X:
print(np.all(X.T == X))
# Out: TrueThis is true for all X with one dimension.
Solution 2:
The X you are using is a list. You should use a numpy.array:
X = np.array([0.4, 0.7])
Post a Comment for "Attributeerror: 'list' Object Has No Attribute 't'"