Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
1f6883c1
Commit
1f6883c1
authored
Jul 14, 2016
by
Anna Petrovicheva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed field
parent
acc55b24
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
flatten_layer.cpp
modules/dnn/src/layers/flatten_layer.cpp
+3
-3
flatten_layer.hpp
modules/dnn/src/layers/flatten_layer.hpp
+1
-1
normalize_bbox_layer.cpp
modules/dnn/src/layers/normalize_bbox_layer.cpp
+1
-1
normalize_bbox_layer.hpp
modules/dnn/src/layers/normalize_bbox_layer.hpp
+1
-1
permute_layer.cpp
modules/dnn/src/layers/permute_layer.cpp
+6
-6
permute_layer.hpp
modules/dnn/src/layers/permute_layer.hpp
+1
-1
No files found.
modules/dnn/src/layers/flatten_layer.cpp
View file @
1f6883c1
...
...
@@ -71,7 +71,7 @@ FlattenLayer::FlattenLayer(LayerParams ¶ms) : Layer(params)
}
else
{
_endAxis
=
_num
_a
xes
+
params
.
end_axis
;
_endAxis
=
_num
A
xes
+
params
.
end_axis
;
}
}
...
...
@@ -80,7 +80,7 @@ void FlattenLayer::checkInputs(const std::vector<Blob*> &inputs)
CV_Assert
(
inputs
.
size
()
>
0
);
for
(
size_t
i
=
0
;
i
<
inputs
.
size
();
i
++
)
{
for
(
size_t
j
=
0
;
j
<
_num
_a
xes
;
j
++
)
for
(
size_t
j
=
0
;
j
<
_num
A
xes
;
j
++
)
{
CV_Assert
(
inputs
[
i
]
->
shape
[
j
]
==
inputs
[
0
]
->
shape
[
j
]);
}
...
...
@@ -110,7 +110,7 @@ void FlattenLayer::allocate(const std::vector<Blob*> &inputs, std::vector<Blob>
outputShape
[
i
]
=
inputs
[
0
]
->
shape
()[
i
-
interval
];
}
outputShape
[
_endAxis
]
=
flattenedDimensionSize
;
for
(
size_t
i
=
_endAxis
+
1
;
i
<
_num
_a
xes
;
i
++
)
for
(
size_t
i
=
_endAxis
+
1
;
i
<
_num
A
xes
;
i
++
)
{
outputShape
[
i
]
=
inputs
[
0
]
->
shape
()[
i
];
}
...
...
modules/dnn/src/layers/flatten_layer.hpp
View file @
1f6883c1
...
...
@@ -52,7 +52,7 @@ class FlattenLayer : public Layer
size_t
_startAxis
;
size_t
_endAxis
;
static
const
size_t
_num
_a
xes
=
4
;
static
const
size_t
_num
A
xes
=
4
;
public
:
FlattenLayer
(
LayerParams
&
params
);
...
...
modules/dnn/src/layers/normalize_bbox_layer.cpp
View file @
1f6883c1
...
...
@@ -76,7 +76,7 @@ void NormalizeBBoxLayer::checkInputs(const std::vector<Blob*> &inputs)
CV_Assert
(
inputs
.
size
()
>
0
);
for
(
size_t
i
=
0
;
i
<
inputs
.
size
();
i
++
)
{
for
(
size_t
j
=
0
;
j
<
_num
_a
xes
;
j
++
)
for
(
size_t
j
=
0
;
j
<
_num
A
xes
;
j
++
)
{
CV_Assert
(
inputs
[
i
]
->
shape
[
j
]
==
inputs
[
0
]
->
shape
[
j
]);
}
...
...
modules/dnn/src/layers/normalize_bbox_layer.hpp
View file @
1f6883c1
...
...
@@ -71,7 +71,7 @@ class NormalizeBBoxLayer : public Layer
size_t
_channelSize
;
size_t
_imageSize
;
static
const
size_t
_num
_a
xes
=
4
;
static
const
size_t
_num
A
xes
=
4
;
public
:
NormalizeBBoxLayer
(
LayerParams
&
params
);
...
...
modules/dnn/src/layers/permute_layer.cpp
View file @
1f6883c1
...
...
@@ -57,7 +57,7 @@ PermuteLayer::PermuteLayer(LayerParams ¶ms) : Layer(params)
}
else
{
for
(
size_t
i
=
0
;
i
<
_num
_a
xes
;
i
++
)
for
(
size_t
i
=
0
;
i
<
_num
A
xes
;
i
++
)
{
size_t
current_order
=
params
.
order
(
i
);
...
...
@@ -69,7 +69,7 @@ PermuteLayer::PermuteLayer(LayerParams ¶ms) : Layer(params)
}
_needsPermute
=
false
;
for
(
int
i
=
0
;
i
<
_num
_a
xes
;
++
i
)
for
(
int
i
=
0
;
i
<
_num
A
xes
;
++
i
)
{
if
(
_order
[
i
]
!=
i
)
{
...
...
@@ -86,7 +86,7 @@ void PermuteLayer::allocate(const std::vector<Blob*> &inputs, std::vector<Blob>
_oldDimensionSize
=
inputs
[
0
]
->
shape
();
for
(
size_t
i
=
0
;
i
<
_num
_a
xes
;
i
++
)
for
(
size_t
i
=
0
;
i
<
_num
A
xes
;
i
++
)
{
_newDimensionSize
[
i
]
=
_oldDimensionSize
[
order
[
i
]];
}
...
...
@@ -99,8 +99,8 @@ void PermuteLayer::allocate(const std::vector<Blob*> &inputs, std::vector<Blob>
outputs
[
i
].
create
(
BlobShape
(
_newDimensionSize
));
}
_oldStride
.
resize
(
_num
_a
xes
);
_newStride
.
resize
(
_num
_a
xes
);
_oldStride
.
resize
(
_num
A
xes
);
_newStride
.
resize
(
_num
A
xes
);
_oldStride
[
3
]
=
1
;
_newStride
[
3
]
=
1
;
...
...
@@ -135,7 +135,7 @@ void PermuteLayer::forward(std::vector<Blob*> &inputs, std::vector<Blob> &output
int
oldPosition
=
0
;
int
newPosition
=
i
;
for
(
int
j
=
0
;
j
<
_num
_a
xes
;
++
j
)
for
(
int
j
=
0
;
j
<
_num
A
xes
;
++
j
)
{
oldPosition
+=
(
newPosition
/
_newStride
[
j
])
*
_oldStride
[
_order
[
j
]];
newPosition
%=
_newStride
[
j
];
...
...
modules/dnn/src/layers/permute_layer.hpp
View file @
1f6883c1
...
...
@@ -59,7 +59,7 @@ class PermuteLayer : public Layer
std
::
vector
<
size_t
>
_newStride
;
bool
_needsPermute
;
static
const
size_t
_num
_a
xes
=
4
;
static
const
size_t
_num
A
xes
=
4
;
public
:
PermuteLayer
(
LayerParams
&
params
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment