sketchysgd's People
Forkers
nalzoksketchysgd's Issues
ValueError: cannot reshape array of size 5365248 into shape (20958,1)
Hi there, I got the following error when attempting to reproduce the sketchysgd experiment on logistic regression. Here is the relevant part of the training log
Warning: search size is not used for sketchysgd
optimizer = sketchysgd
dataset = rcv1
dataset location = /home/qys/Research/SketchySGD/data
# of epochs = 20
# of samples in random search = 10
random seeds = [123, 234, 345]
numpy seeds = [246, 468, 690]
model type = logistic
{'precond': 3200}
Traceback (most recent call last):
File "/home/qys/Research/SketchySGD/general_experiments.py", line 202, in <module>
main()
File "/home/qys/Research/SketchySGD/general_experiments.py", line 192, in main
result = experiment.run(max_epochs, bg)
File "/home/qys/Research/SketchySGD/experiment.py", line 93, in run
opt.step(batch)
File "/home/qys/Research/SketchySGD/opts/sketchysgd.py", line 35, in step
sing_val = la.svds(lin_op, k = 1, which = 'LM', return_singular_vectors = False)
File "/home/qys/Research/SketchySGD/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/_svds.py", line 539, in svds
Av = X_matmat(eigvec)
File "/home/qys/Research/SketchySGD/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py", line 377, in rmatmat
Y = self._rmatmat(X)
File "/home/qys/Research/SketchySGD/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py", line 542, in _rmatmat
return super()._rmatmat(X)
File "/home/qys/Research/SketchySGD/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py", line 387, in _rmatmat
return self.H.matmat(X)
File "/home/qys/Research/SketchySGD/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py", line 337, in matmat
Y = self._matmat(X)
File "/home/qys/Research/SketchySGD/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py", line 527, in _matmat
return super()._matmat(X)
File "/home/qys/Research/SketchySGD/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py", line 187, in _matmat
return np.hstack([self.matvec(col.reshape(-1,1)) for col in X.T])
File "/home/qys/Research/SketchySGD/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py", line 187, in <listcomp>
return np.hstack([self.matvec(col.reshape(-1,1)) for col in X.T])
File "/home/qys/Research/SketchySGD/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py", line 242, in matvec
y = y.reshape(M,1)
ValueError: cannot reshape array of size 12092416 into shape (47236,1)
Any idea how to fix this?
In case it's relevant, I am using Ubuntu 20.04.5 LTS and Python 3.10.4 with the following packages
$ pipenv run pip list --not-required
Package Version
------------ -------
fqdn 1.5.1
isoduration 20.11.0
jsonpointer 2.3
jupyterlab 3.6.1
matplotlib 3.7.1
pandas 1.5.3
pip 22.3.1
scikit-learn 1.2.2
setuptools 66.1.1
uri-template 1.2.0
webcolors 1.12
wheel 0.38.4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.