mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-12-23 14:54:28 +00:00
Migrate output layer
This commit is contained in:
14
src/backends/cuda/layers/output.cu
Normal file
14
src/backends/cuda/layers/output.cu
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "output.hpp"
|
||||
|
||||
#include "cuda_helper.cuh"
|
||||
|
||||
using namespace CUDANet::Layers;
|
||||
|
||||
float* Output::forwardCUDA(const float* input) {
|
||||
CUDA_CHECK(cudaMemcpy(
|
||||
h_output, input, sizeof(float) * inputSize, cudaMemcpyDeviceToHost
|
||||
));
|
||||
CUDA_CHECK(cudaDeviceSynchronize());
|
||||
|
||||
return h_output;
|
||||
}
|
||||
Reference in New Issue
Block a user