Skip to content
New issue

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

Pycaffe fixes and example reformation #2058

Merged
merged 10 commits into from
Mar 9, 2015
Merged

Conversation

shelhamer
Copy link
Member

Fix recent issues with pycaffe examples.

The caffe.Net interface and solver are the core of pycaffe. The Classifier and Detector "convenience" classes were a mistake on my part that seem to have mostly confused. To better illustrate the main interface this PR will switch to caffe.Net throughout (or at least take steps in that direction).

Next up

  • switch to caffe.Net everywhere and deprecate Classifier, Detector
  • pycaffe tour: demonstrate caffe.Net, caffe.io, solver interface
  • Python net specification Python net specification #1733 will make logreg + net surgery better
  • Python layer: explain interface and show data and loss examples

@@ -104,15 +104,20 @@ def main(argv):

if args.gpu:
print('GPU mode')
else:
print 'CPU mode'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Print statements without the parentheses break the Python 3 compatibility that @philkr added in #1923.

As @longjon said,

Regarding future PRs, yes, let's try to maintain Python 3 compatibility as long as it's easy to do so.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right -- thanks for the reminder. This was just a cherry-pick so I'm still making changes and combing over.

- download CaffeNet if it isn't there
- switch to caffe.Net
- reshape net for single input
- explain param, bias indexing
- update output for N-D blobs
- N-D blob parameter dimensions
- add filtering section to net surgery example
- make Gaussian blur and Sobel edge kernels
- alter biases
- do flat assignment instead of reshape and explain memory layout
- make dir for surgery files
- add a little explanation
- solve from Python and the command line
- time scikit-learn and caffe
- fix test iterations (number of instances / batch size)
call forward to warm-start the demo so the first request isn't slow.
@shelhamer
Copy link
Member Author

@longjon I'm merging these fixes to the broken parts of pycaffe and examples but the real switch to caffe.Net everywhere is still to come.

shelhamer added a commit that referenced this pull request Mar 9, 2015
Pycaffe fixes and example reformation
@shelhamer shelhamer merged commit d9ed0b9 into BVLC:master Mar 9, 2015
@shelhamer shelhamer deleted the py-fixes branch March 9, 2015 06:20
@shelhamer shelhamer mentioned this pull request Mar 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants