Fixed nan issue for training with CUDNN_HALF=1 by using Tensor Cores

This commit is contained in:
AlexeyAB
2018-12-07 22:40:10 +03:00
parent 21a4ec9390
commit 7c2f302321
9 changed files with 318 additions and 249 deletions

View File

@ -165,7 +165,7 @@ convolutional_layer parse_convolutional(list *options, size_params params)
int xnor = option_find_int_quiet(options, "xnor", 0);
int use_bin_output = option_find_int_quiet(options, "bin_output", 0);
convolutional_layer layer = make_convolutional_layer(batch,h,w,c,n,size,stride,padding,activation, batch_normalize, binary, xnor, params.net.adam, use_bin_output);
convolutional_layer layer = make_convolutional_layer(batch,h,w,c,n,size,stride,padding,activation, batch_normalize, binary, xnor, params.net.adam, use_bin_output, params.index);
layer.flipped = option_find_int_quiet(options, "flipped", 0);
layer.dot = option_find_float_quiet(options, "dot", 0);
@ -655,7 +655,8 @@ void parse_net_options(list *options, network *net)
net->policy = get_policy(policy_s);
net->burn_in = option_find_int_quiet(options, "burn_in", 0);
#ifdef CUDNN_HALF
net->burn_in = 0;
//net->burn_in = 0;
net->cudnn_half = 1;
#endif
if(net->policy == STEP){
net->step = option_find_int(options, "step", 1);