Skip to content
Features
Business
Explore
Marketplace
Pricing
This repository
Sign in
or
Sign up
Watch
1,993
Star
19,395
Fork
11,912
BVLC
/
caffe
Code
Issues
517
Pull requests
252
Projects
0
Wiki
Insights
Pulse
Graphs
Malloc at least one byte in Parallel
#2924
Merged
ronghanghu
merged 1 commit into
BVLC
:
master
from
ronghanghu
:
fix-malloc-empty
Aug 14, 2015
Conversation
2
Commits
1
Files changed
1
Changes from
all commits
Commits
Show all changes
1 commit
Select commit
1d820f7
Malloc at least one byte in Parallel
ronghanghu
Aug 14, 2015
Jump to…
Jump to file or symbol
Failed to load files and symbols.
Retry
+3
−1
Unified
Split
Show comments
View
4
src/caffe/parallel.cpp
@@ -64,7 +64,9 @@ static size_t total_size(const vector<Blob<Dtype>*>& params) {
size_t
size =
0
;
for
(
int
i =
0
; i < params.
size
(); ++i)
size += params[i]->
count
();
-
return
size;
+
//
Size have at least one byte, otherwise cudaMalloc fails if net has no
+
//
learnable parameters.
+
return
(size >
0
) ? size :
1
;
}
template
<
typename
Dtype>
Toggle all file notes
You can't perform that action at this time.
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.