# ランダムな初期値からスタート
init = np.random.rand(6)
# 損失関数が最小となるθを求める
res = minimize(cost_func, init, method='Powell')
# その時の損失関数の値を求める
cost_func(res.x)