i'm completing assignment school in need receive information html form ruby cgi script, , use fadein() jquery method display it. my script looks like: #!/usr/local/bin/ruby -w require 'cgi' cgi = cgi.new('html4') cgi.out{ cgi.html{ cgi.head{cgi.title{"this test"}+ cgi.style{"p{color = red;}"}} + cgi.body{cgi.p{"try " + cgi['ffname'] + ", did work?"}} } } this of test code, make sure server working way thought was. when try , use like: puts "<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>" the server refuses run it, guess that's not allowed. i'm still beginner ruby cgi class. how can reference jquery library these cgi methods? similar how sending html client side, send javascript code client side. javascript code contain call jquery function.
i want search hyper-parameters in convolutional net built keras. using kerasclassifier , gridsearchcv scikit-learn in line intro given here machinelearningmastery . typically scikit-learn optimizes on 'accuracy' , network runs image segmentation optimizing jaccard index. need define own scoring object grid search using make_scorer explaned here make_scorer , here defining scoring strategy . code section below shows implementation, getting error in model.compile(optimizer=optimizer, loss=eval_loss, metrics=(['eval_func']) , not know specify in metrics. default 'accuracy' assume in case 'eval_func' (which works when not doing grid search) or 'score' neither of these works in case. what right syntax? def eval_func(y_true, y_pred): '''evaluation function dice or jaccard, set global var jaccard=true''' if jaccard: return jaccard_index(y_true, y_pred) else: return dice_coef(y_true, y_pred)...
Comments
Post a Comment