You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
775 B
24 lines
775 B
#include "cuda.h"
|
|
#include "../layers/avgpoolLayer.h"
|
|
|
|
void gpuCUDA::pull_layer(avgpoolLayer *layer){
|
|
if (layer->m_pOutput != NULL && layer->m_pDelta != NULL){
|
|
if (layer->m_pGpuOutput != NULL){
|
|
pullFloatArray(layer->m_pGpuOutput, layer->m_pOutput, layer->m_nOutputVol);
|
|
};
|
|
if (layer->m_pGpuDelta != NULL){
|
|
pullFloatArray(layer->m_pGpuDelta, layer->m_pDelta, layer->m_nDeltaVol);
|
|
};
|
|
};
|
|
};
|
|
|
|
void gpuCUDA::push_layer(avgpoolLayer *layer){
|
|
if (layer->m_pOutput != NULL && layer->m_pDelta != NULL){
|
|
if (layer->m_pGpuOutput != NULL){
|
|
pushFloatArray(layer->m_pGpuOutput, layer->m_pOutput, layer->m_nOutputVol);
|
|
};
|
|
if (layer->m_pGpuDelta != NULL){
|
|
pushFloatArray(layer->m_pGpuDelta, layer->m_pDelta, layer->m_nDeltaVol);
|
|
};
|
|
};
|
|
};
|