Comments (6)
Sorry for the delay folks. If this is the problem I'm thinking of I fixed this internally a while ago, but didn't get around to pushing out the OSS version. Sorry about that.
I think a8bba86 should fix the issue, LMK if it doesn't. Thanks.
from fb-caffe-exts.
@andreistoian: I had the same issue, somewhat hackishly in my Caffe installation I had to remove the check altogether (from src/caffe/layers/split_layer.cpp
)
- CHECK_NE(top[i], bottom[0]) << this->type() << " Layer does not "
- "allow in-place computation.";
to get the optimizer to work with custom VGG-derived architectures. I did not see any adverse affects from this in evaluation / performance.
from fb-caffe-exts.
The bug still exists, for GoogLeNet. The error messages are as follows:
// Do not allow in-place computation in the SplitLayer. Instead, share data
// by reference in the forward pass, and keep separate diff allocations in
// the backward pass. (Technically, it should be possible to share the diff
// blob of the first split output with the input, but this seems to cause
// some strange effects in practice...)
CHECK_NE(top[i], bottom[0]) << this->type() << " Layer does not "
"allow in-place computation.";
from fb-caffe-exts.
@wangxianliang does removing the check and re-compiling Caffe work?
from fb-caffe-exts.
Yeah, move the CHECK to Backward_cpu pass.
--- a/caffe/caffe-trunk/src/caffe/layers/split_layer.cpp
+++ b/caffe/caffe-trunk/src/caffe/layers/split_layer.cpp
@@ -16,8 +16,6 @@
// the backward pass. (Technically, it should be possible to share the diff
// blob of the first split output with the input, but this seems to cause
// some strange effects in practice...)
- CHECK_NE(top[i], bottom[0]) << this->type() << " Layer does not "
- "allow in-place computation.";
top[i]->ReshapeLike(*bottom[0]);
CHECK_EQ(count_, top[i]->count());
}
@@ -36,13 +34,17 @@
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom) {
if (!propagate_down[0]) { return; }
if (top.size() == 1) {
+ CHECK_NE(top[0], bottom[0]) << this->type() << " Layer does not "
+ "allow in-place computation.";
caffe_copy(count_, top[0]->cpu_diff(), bottom[0]->mutable_cpu_diff());
return;
}
caffe_add(count_, top[0]->cpu_diff(), top[1]->cpu_diff(),
bottom[0]->mutable_cpu_diff());
// Add remaining top blob diffs.
for (int i = 2; i < top.size(); ++i) {
+ CHECK_NE(top[i], bottom[0]) << this->type() << " Layer does not "
+ "allow in-place computation.";
const Dtype* top_diff = top[i]->cpu_diff();
Dtype* bottom_diff = bottom[0]->mutable_cpu_diff();
caffe_axpy(count_, Dtype(1.), top_diff, bottom_diff);
from fb-caffe-exts.
Removing the check does work, thanks a lot.
from fb-caffe-exts.
Related Issues (20)
- Some questions about using Predictor HOT 1
- issues building torch2caffe HOT 2
- is nn.gModule for input not valid?
- module 'fb.python' not found:No LuaRocks module found for fb.python HOT 5
- Unknown layer type: table HOT 9
- Usage of predictor HOT 1
- Optimizing advantage since cuDNN 5.1?
- torch2caffe.lua unknown Torch class <DenseCapModel> HOT 1
- fb.python not found HOT 3
- Unknown layer type: nn.SpatialFullConvolution
- Error while building thpp
- some questions about PooledPredictor
- torch2caffe with multi input
- "attempt to index upvalue 't2c' (a nil value)"
- How to use predictor HOT 6
- Build error for layers
- [Predictor][Compile Error][OSX] Undefined symbol for architecture x86_64, clang: error: linker command failed with exit code 1 HOT 3
- torch2caffe convertor HOT 1
- reduce memory usage, gpu memory or cpu memory?
- google test err
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.
from fb-caffe-exts.