小编Eri*_*aro的帖子

计算损失相对于层输入的偏导数 | 链式法则| Python

该作业的任务是计算损失相对于该层输入的偏导数。您必须实施链式法则。

我很难从概念上理解如何设置该功能。任何建议或提示将不胜感激!

函数变量的示例数据位于底部。

def dense_grad_input(x_input, grad_output, W, b):
    """Calculate the partial derivative of 
        the loss with respect to the input of the layer
    # Arguments
        x_input: input of a dense layer - np.array of size `(n_objects, n_in)`
        grad_output: partial derivative of the loss functions with 
            respect to the ouput of the dense layer 
            np.array of size `(n_objects, n_out)`
        W: np.array of size `(n_in, n_out)`
        b: np.array of size `(n_out,)`
    # Output
        the partial derivative of the loss with 
        respect to …
Run Code Online (Sandbox Code Playgroud)

python machine-learning derivative differential-equations deep-learning

4
推荐指数
1
解决办法
3919
查看次数

从字符串数组中删除值?

我有150,000行文本文件,它存储为字符串数组,如下所示:

String[] OutputArray = File.ReadAllLines(TB_Complete.Text);
Run Code Online (Sandbox Code Playgroud)

如何从OutputArray中删除指定的行列表?或者更好的是我如何删除前1000行的OutputArray?

*编辑:我需要前1000行读取,解析,输出到另一个文本文件,然后删除.对不起,我没有澄清.

c# arrays streamreader text-files visual-studio

-3
推荐指数
1
解决办法
747
查看次数