We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I´m having problems executing the function preprocess_features(features) in train.py.
def preprocess_features(features): """Row-normalize feature matrix and convert to tuple representation""" rowsum = np.array(features.sum(1)) # <<<--- ERROR r_inv = np.power(rowsum, -1).flatten() r_inv[np.isinf(r_inv)] = 0. r_mat_inv = sp.diags(r_inv) features = r_mat_inv.dot(features) return sparse_to_tuple(features)
The error is: 'tuple' object has no attribute 'sum'
Could somebody help me in solving this issue?
Thank you
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I´m having problems executing the function preprocess_features(features) in train.py.
def preprocess_features(features):
"""Row-normalize feature matrix and convert to tuple representation"""
rowsum = np.array(features.sum(1)) # <<<--- ERROR
r_inv = np.power(rowsum, -1).flatten()
r_inv[np.isinf(r_inv)] = 0.
r_mat_inv = sp.diags(r_inv)
features = r_mat_inv.dot(features)
return sparse_to_tuple(features)
The error is: 'tuple' object has no attribute 'sum'
Could somebody help me in solving this issue?
Thank you
The text was updated successfully, but these errors were encountered: