mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Bug fix with assert() during training
This commit is contained in:
@ -133,13 +133,12 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(OPENCV_DIR)\include;C:\opencv_3.0\opencv\build\include;..\..\include;..\..\3rdparty\stb\include;..\..\3rdparty\pthreads\include;%(AdditionalIncludeDirectories);$(CudaToolkitIncludeDir);$(CUDNN)\include;$(cudnn)\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>OPENCV;CUDNN_HALF;CUDNN;_TIMESPEC_DEFINED;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_RAND_S;GPU;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>OPENCV;CUDNN_HALF;CUDNN;_TIMESPEC_DEFINED;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_RAND_S;GPU;WIN32;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<CLanguageStandard>c11</CLanguageStandard>
|
||||
<CppLanguageStandard>c++1y</CppLanguageStandard>
|
||||
<PrecompiledHeaderCompileAs>CompileAsCpp</PrecompiledHeaderCompileAs>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<UndefinePreprocessorDefinitions>
|
||||
</UndefinePreprocessorDefinitions>
|
||||
<UndefinePreprocessorDefinitions>NDEBUG</UndefinePreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -161,11 +161,12 @@ void forward_backward_network_gpu(network net, float *x, float *y)
|
||||
for (i = 0; i < net.n; ++i) {
|
||||
layer l = net.layers[i];
|
||||
if (net.cudnn_half){
|
||||
assert((l.c*l.n*l.size*l.size) > 0);
|
||||
if (l.type == CONVOLUTIONAL && l.weights_gpu && l.weights_gpu16) {
|
||||
assert((l.c*l.n*l.size*l.size) > 0);
|
||||
cuda_convert_f32_to_f16(l.weights_gpu, l.c*l.n*l.size*l.size, l.weights_gpu16);
|
||||
}
|
||||
else if (l.type == CRNN && l.input_layer->weights_gpu && l.input_layer->weights_gpu16) {
|
||||
assert((l.input_layer->c*l.input_layer->n*l.input_layer->size*l.input_layer->size) > 0);
|
||||
cuda_convert_f32_to_f16(l.input_layer->weights_gpu, l.input_layer->nweights, l.input_layer->weights_gpu16);
|
||||
cuda_convert_f32_to_f16(l.self_layer->weights_gpu, l.self_layer->nweights, l.self_layer->weights_gpu16);
|
||||
cuda_convert_f32_to_f16(l.output_layer->weights_gpu, l.output_layer->nweights, l.output_layer->weights_gpu16);
|
||||
|
Reference in New Issue
Block a user