From 0dab894a5be9f7d10d85e89dea91d02c71bae84d Mon Sep 17 00:00:00 2001
From: Edmond Yoo <hj3yoo@uwaterloo.ca>
Date: Sun, 16 Sep 2018 03:24:45 +0000
Subject: [PATCH] Moving files from MTGCardDetector repo
---
src/reorg_old_layer.c | 48 ++++++++++++++++++++++++------------------------
1 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/reorg_old_layer.c b/src/reorg_old_layer.c
index c55cf7c..30206d9 100644
--- a/src/reorg_old_layer.c
+++ b/src/reorg_old_layer.c
@@ -77,42 +77,42 @@
void forward_reorg_old_layer(const layer l, network_state state)
{
- if (l.reverse) {
- reorg_cpu(state.input, l.w, l.h, l.c, l.batch, l.stride, 1, l.output);
- }
- else {
- reorg_cpu(state.input, l.w, l.h, l.c, l.batch, l.stride, 0, l.output);
- }
+ if (l.reverse) {
+ reorg_cpu(state.input, l.w, l.h, l.c, l.batch, l.stride, 1, l.output);
+ }
+ else {
+ reorg_cpu(state.input, l.w, l.h, l.c, l.batch, l.stride, 0, l.output);
+ }
}
void backward_reorg_old_layer(const layer l, network_state state)
{
- if (l.reverse) {
- reorg_cpu(l.delta, l.w, l.h, l.c, l.batch, l.stride, 0, state.delta);
- }
- else {
- reorg_cpu(l.delta, l.w, l.h, l.c, l.batch, l.stride, 1, state.delta);
- }
+ if (l.reverse) {
+ reorg_cpu(l.delta, l.w, l.h, l.c, l.batch, l.stride, 0, state.delta);
+ }
+ else {
+ reorg_cpu(l.delta, l.w, l.h, l.c, l.batch, l.stride, 1, state.delta);
+ }
}
#ifdef GPU
void forward_reorg_old_layer_gpu(layer l, network_state state)
{
- if (l.reverse) {
- reorg_ongpu(state.input, l.w, l.h, l.c, l.batch, l.stride, 1, l.output_gpu);
- }
- else {
- reorg_ongpu(state.input, l.w, l.h, l.c, l.batch, l.stride, 0, l.output_gpu);
- }
+ if (l.reverse) {
+ reorg_ongpu(state.input, l.w, l.h, l.c, l.batch, l.stride, 1, l.output_gpu);
+ }
+ else {
+ reorg_ongpu(state.input, l.w, l.h, l.c, l.batch, l.stride, 0, l.output_gpu);
+ }
}
void backward_reorg_old_layer_gpu(layer l, network_state state)
{
- if (l.reverse) {
- reorg_ongpu(l.delta_gpu, l.w, l.h, l.c, l.batch, l.stride, 0, state.delta);
- }
- else {
- reorg_ongpu(l.delta_gpu, l.w, l.h, l.c, l.batch, l.stride, 1, state.delta);
- }
+ if (l.reverse) {
+ reorg_ongpu(l.delta_gpu, l.w, l.h, l.c, l.batch, l.stride, 0, state.delta);
+ }
+ else {
+ reorg_ongpu(l.delta_gpu, l.w, l.h, l.c, l.batch, l.stride, 1, state.delta);
+ }
}
#endif
--
Gitblit v1.10.0