Skip to content

move CPU_ONLY to right place#2370

Merged
longjon merged 2 commits intoBVLC:masterfrom
gdh1995:master
Apr 26, 2015
Merged

move CPU_ONLY to right place#2370
longjon merged 2 commits intoBVLC:masterfrom
gdh1995:master

Conversation

@gdh1995
Copy link
Copy Markdown
Contributor

@gdh1995 gdh1995 commented Apr 26, 2015

At other places, CPU_ONLY are used on such a way:

    case Caffe::GPU:
#ifndef CPU_ONLY
      ...
#else
    NO_GPU;
#endif
      break;

A typo in comment is also fixed.

longjon added a commit that referenced this pull request Apr 26, 2015
move CPU_ONLY to right place
@longjon longjon merged commit 69f32ba into BVLC:master Apr 26, 2015
@longjon
Copy link
Copy Markdown
Contributor

longjon commented Apr 26, 2015

Yes, this is equivalent but seems like a slightly better style; case blocks should generally end with an explicit control flow statement. Thanks for the update @gdh1995! I'm going to go ahead and merge this small change, but two comments for the future:

  • we'd appreciate separate PRs for unrelated changes (even small typo fixes; that way we can always merge those without delay)
  • please try to be precise with your commit messages so we can read history easily (e.g., here it's break rather than CPU_ONLY that's in the wrong place)

Thanks!

dribnet added a commit to dribnet/caffe that referenced this pull request Apr 27, 2015
Removed the CPU_ONLY fix introduced in
BVLC#2370 because the surrounding
Net<Dtype>::Update() logic was previously
removed in this feature branch at a7eaaf5.

Merge remote-tracking branch 'jeff/recurrent'

* jeff/recurrent: (26 commits)
  RecurrentLayer bugfix: params still need backprop
  Prototxts + script for training LRCN COCO image captioning model
  Prototxts + script for training COCO caption language model
  Add scripts to create HDF5 datasets from COCO captions
  Add scripts for downloading COCO2014 tools & data
  Add LSTMLayer and LSTMUnitLayer, with tests
  Add RNNLayer, with tests
  Add RecurrentLayer: an abstract superclass for other recurrent layer types
  TestNet fixes for Net weight sharing modifications
  Modifications to Net to facilitate unrolled recurrent networks
  Allow ConcatLayer to take a single bottom Blob (for testing)
  Allow SliceLayer to have a single top Blob (for testing)
  EltwiseLayer with coeff blob GPU kernel
  EltwiseLayer can take a blob of per-num coefficients
  AccuracyLayer: add 'denominator' param
  FlattenLayer fix -- top should always Share* from bottom (and do everything in Reshape)
  Add (very simple version of) ReshapeLayer
  EmbedBackward with no loops -- use caffe_gpu_atomic_add instead
  Add EmbedLayer for inner products with sparse input (one-hot vectors), with unit tests
  test_gradient_check_util: check_bottom < -1 only checks params
  ...

Conflicts:
  src/caffe/net.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants