Recipe 13
xentropy = tf.nn.sigmoid_cross_entropy_with_logits(
logits=my_output_expanded, labels=y_target_expanded)
What is logits # Reference 1: barber:
Convinced!
Recipe 14
rand_x = [x_vals[rand_index]]
rand_y = [y_vals[rand_index]]
sess.run(train_step, feed_dict={x_data: rand_x, y_target: rand_y})
Enclose it in [] to make it two-dimensional according to the placeholder. Is it okay to pass a list to x_data? I wondered if it didn't have to be a tensor type, but it was ok to pass it to the placeholder, whether it was an array or a scalar # Reference 2: crossed_flags:
Recipe 15
plt.plot(setosa_x, setosa_y, 'rx', ms=10, mew=2, label='setosa')
ms, what is mew: performing_arts: ms == marker size mew == marker edge width
Recipe 16
train_indices = np.random.choice(len(x_vals), round(len(x_vals)*0.8), replce=False)
train_indices = np.array(list(set(range(len(x_vals))) = set(train_indices)))
Long: moyai: np.random.choice (integer a, integer b) randomly extracts b pieces from the contents of the array generated by np.arange (a) # Reference 3 Round to an integer Doubly prohibited with replace = False By making it a set type with set (), you can calculate sums, differences, products, etc. as a set. It seems that the argument of np.array is list or tuple, so convert from set type to list with list () And can't you do [set (hogehoge)] instead of list (set (hogehoge))? I thought, but something was different (in the latter case, the entire set (hogehoge) becomes the 0th element of the list) You have to write it explicitly when converting
Evaluation of classification model 5.
bins = np.linspace(-5, 5, 50)
plt.hist(x_vals[0:50], bins, ...)
plt.hist(x_vals[50:100], bins[0:50], ...)
Why did you write the range for bins on the second line? I thought, did this specify that the range of x_vals changed but the range of bins did not change (not necessary): hotsprings:
reduce_mean reduce: reduce temp_loss temp (== temporary): Temporary indices: plural of index bin: Intervals / classes that are relatively prime. category.
<!-Decompose (ex. Reduce a compound to its elements) #Reference 4->
Recommended Posts