# End of Epoch #################################################################### #################################################################### print "\n%s\n\t End of epoch %d, \n printing some debug info.\n%s" \ %('-'*30, epoch, '-'*30) #################################################################### #################################################################### # print insp_ train_ce.append(_avg(ce)) # validate valid_ce.append(test_lio_skel(use, test_model, batch, drop, tr.rng, epoch, tr.batch_size, x_, y_, loader, x_skeleton_)) # save best params # if valid_ce[-1][1] < 0.25: res_dir = save_results(train_ce, valid_ce, res_dir, params=params) if not tr.moved: res_dir = move_results(res_dir) if valid_ce[-1][1] < best_valid: save_params(params, res_dir, "best") save_params(params, res_dir) if valid_ce[-1][1] < best_valid: best_valid = valid_ce[-1][1] # epoch report epoch_report(epoch, best_valid, time()-time_start, learning_rate.get_value(borrow=True),\ train_ce[-1], valid_ce[-1], res_dir) # make_plot(train_ce, valid_ce) if lr.decay_each_epoch: learning_rate.set_value(float32(learning_rate.get_value(borrow=True)*lr.decay))
#################################################################### print "\n%s\n\t End of epoch %d, \n printing some debug info.\n%s" \ %('-'*30, epoch, '-'*30) #################################################################### #################################################################### # print insp_ train_ce.append(_avg(ce)) # validate valid_ce.append( test_lio_skel(use, test_model, batch, drop, tr.rng, epoch, tr.batch_size, x_, y_, loader, x_skeleton_)) # save best params # if valid_ce[-1][1] < 0.25: res_dir = save_results(train_ce, valid_ce, res_dir, params=params) if not tr.moved: res_dir = move_results(res_dir) if valid_ce[-1][1] < best_valid: save_params(params, res_dir, "best") save_params(params, res_dir) if valid_ce[-1][1] < best_valid: best_valid = valid_ce[-1][1] # epoch report epoch_report(epoch, best_valid, time()-time_start, time()-prog_start_time, learning_rate.get_value(borrow=True),\ train_ce[-1], valid_ce[-1], res_dir) # make_plot(train_ce, valid_ce) if lr.decay_each_epoch: learning_rate.set_value(