我想创建一个神经网络近似函数(正弦,余弦,自定义...),但我努力与格式,我不想使用输入 - 标签,而是输入输出。我该如何改变它? 我下面this tutorial import tensorflow as tf
import random
from math import sin
import numpy as np
n_nodes_hl1 = 500
n_nodes_hl2 =
我将通过实例解释我的问题: >>> #In this case, I get unwanted result
>>> k = 20685671025767659927959422028/2580360422
>>> k
8.016582043889239e+18
>>> math.floor(k)
8016582043889239040
>>> #I dont want this to
我知道我们可以利用蒙特卡罗方法,通过“扔”点上右上角近似PI并计算其中有多少是圆等内部.. 我想这样做,对于每函数f,所以我在矩形“扔” 随机点[A,b]×[0;最大(F)],我如果我的random_point_y测试低于f(random_point_x),然后我将总数除以f以下的点数。 下面是代码: clear
close all
%Let's define our function f