• <em id="6vhwh"><rt id="6vhwh"></rt></em>

    <style id="6vhwh"></style>

    <style id="6vhwh"></style>
    1. <style id="6vhwh"></style>
        <sub id="6vhwh"><p id="6vhwh"></p></sub>
        <p id="6vhwh"></p>
          1. 国产亚洲欧洲av综合一区二区三区 ,色爱综合另类图片av,亚洲av免费成人在线,久久热在线视频精品视频,成在人线av无码免费,国产精品一区二区久久毛片,亚洲精品成人片在线观看精品字幕 ,久久亚洲精品成人av秋霞

            Python日記(三):numpy矩陣以及Torch張量騷操作

            更新時(shí)間:2023-05-27 21:41:21 閱讀: 評(píng)論:0

            少年朗誦稿-電銷話術(shù)

            Python日記(三):numpy矩陣以及Torch張量騷操作
            2023年5月27日發(fā)(作者:百度實(shí)習(xí))

            Python?記(三):numpy矩陣以及Torch張量騷操作

            ?錄

            Numpy

            (array, pad_width, mode, **kwargs)

            給?個(gè)n維矩陣最外圍補(bǔ)?圈任意數(shù),類似于CNN中的padding。

            array:需要padding的array;pad_width:元組形式的數(shù)據(jù),表明了不同的axis的padding位置,before_1表?在axis=0的最開(kāi)始

            補(bǔ),after_2表?在axis=1的末尾補(bǔ);mode:padding的模式,可以是常量甚?也可以是函數(shù)。

            下?是源代碼中給出的參數(shù)描述,那么?長(zhǎng)。

            '''

            Pads an array.

            Parameters

            ----------

            array : array_like of rank N

            Input array

            pad_width : {quence, array_like, int}

            Number of values padded to the edges of each axis.

            ((before_1, after_1), ... (before_N, after_N)) unique pad widths

            for each axis.

            ((before, after),) yields same before and after pad for each axis.

            (pad,) or int is a shortcut for before = after = pad width for all

            axes.

            mode : str or function

            One of the following string values or a ur supplied function.

            'constant'

            Pads with a constant value.

            'edge'

            Pads with the edge values of array.

            'linear_ramp'

            Pads with the linear ramp between end_value and the

            array edge value.

            'maximum'

            Pads with the maximum value of all or part of the

            vector along each axis.

            'mean'

            Pads with the mean value of all or part of the

            vector along each axis.

            'median'

            Pads with the median value of all or part of the

            vector along each axis.

            'minimum'

            Pads with the minimum value of all or part of the

            vector along each axis.

            'reflect'

            Pads with the reflection of the vector mirrored on

            the first and last values of the vector along each

            axis.

            'symmetric'

            Pads with the reflection of the vector mirrored

            along the edge of the array.

            'wrap'

            Pads with the wrap of the vector along the axis.

            The first values are ud to pad the end and the

            end values are ud to pad the beginning.

            end values are ud to pad the beginning.

            <function>

            Padding function, e Notes.

            stat_length : quence or int, optional

            Ud in 'maximum', 'mean', 'median', and 'minimum'. Number of

            values at edge of each axis ud to calculate the statistic value.

            ((before_1, after_1), ... (before_N, after_N)) unique statistic

            lengths for each axis.

            ((before, after),) yields same before and after statistic lengths

            for each axis.

            (stat_length,) or int is a shortcut for before = after = statistic

            length for all axes.

            Default is ``None``, to u the entire axis.

            constant_values : quence or int, optional

            Ud in 'constant'. The values to t the padded values for each

            axis.

            ((before_1, after_1), ... (before_N, after_N)) unique pad constants

            for each axis.

            ((before, after),) yields same before and after constants for each

            axis.

            (constant,) or int is a shortcut for before = after = constant for

            all axes.

            Default is 0.

            end_values : quence or int, optional

            Ud in 'linear_ramp'. The values ud for the ending value of the

            linear_ramp and that will form the edge of the padded array.

            ((before_1, after_1), ... (before_N, after_N)) unique end values

            for each axis.

            ((before, after),) yields same before and after end values for each

            axis.

            (constant,) or int is a shortcut for before = after = end value for

            all axes.

            Default is 0.

            reflect_type : {'even', 'odd'}, optional

            Ud in 'reflect', and 'symmetric'. The 'even' style is the

            default with an unaltered reflection around the edge value. For

            the 'odd' style, the extended part of the array is created by

            subtracting the reflected values from two times the edge value.

            Returns

            -------

            pad : ndarray

            Padded array of rank equal to `array` with shape incread

            according to `pad_width`.

            import numpy as np

            ones3_3 = np.ones([3,3], int)

            print(ones3_3)

            >>>[[1 1 1]

            [1 1 1]

            [1 1 1]]

            在值為1的3×3的矩陣的?的開(kāi)始補(bǔ)1?2,在?的末尾補(bǔ)2?3;在列的開(kāi)始補(bǔ)兩?4,列的末尾補(bǔ)3?5。這操作超好玩。( ̄▽ ̄)~*

            X = np.pad(ones3_3, ((1, 2), (2, 3)), 'constant',

            constant_values=((2,3), (4,5)))

            print(X)

            >>>

            [[4 4 2 2 2 5 5 5]

            [4 4 1 1 1 5 5 5]

            [4 4 1 1 1 5 5 5]

            [4 4 1 1 1 5 5 5]

            [4 4 3 3 3 5 5 5]

            [4 4 3 3 3 5 5 5]]

            Torch

            (x, dim=0)

            移除某?維度并返回?個(gè)和移除維度長(zhǎng)度相同的元組,每個(gè)元組中存放剩余維度的張量。

            假設(shè)() = [30, 128, 100],unbind之后返回:

            30 torch.Size([128, 100])的張量元組。

            臺(tái)詞課-關(guān)于酒的古詩(shī)

            Python日記(三):numpy矩陣以及Torch張量騷操作

            本文發(fā)布于:2023-05-27 21:41:20,感謝您對(duì)本站的認(rèn)可!

            本文鏈接:http://m.newhan.cn/zhishi/a/1685194881181711.html

            版權(quán)聲明:本站內(nèi)容均來(lái)自互聯(lián)網(wǎng),僅供演示用,請(qǐng)勿用于商業(yè)和其他非法用途。如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除。

            本文word下載地址:Python日記(三):numpy矩陣以及Torch張量騷操作.doc

            本文 PDF 下載地址:Python日記(三):numpy矩陣以及Torch張量騷操作.pdf

            標(biāo)簽:騷0日記
            相關(guān)文章
            留言與評(píng)論(共有 0 條評(píng)論)
               
            驗(yàn)證碼:
            Copyright ?2019-2022 Comsenz Inc.Powered by ? 實(shí)用文體寫(xiě)作網(wǎng)旗下知識(shí)大全大全欄目是一個(gè)全百科類寶庫(kù)! 優(yōu)秀范文|法律文書(shū)|專利查詢|
            主站蜘蛛池模板: 国产麻豆精品av在线观看| 亚洲国产精品午夜福利| 精品无码久久久久国产电影| 激情久久av一区二区三区| 日韩精品久久久肉伦网站| 人妻少妇精品视频专区| 高清熟女国产一区二区三区 | 性人久久久久| 国产超高清麻豆精品传媒麻豆精品| 欧美大胆老熟妇乱子伦视频| 久久老熟妇精品免费观看| 亚洲国产一区二区av| 一区二区三区鲁丝不卡| 亚洲人妻一区二区精品| 国产精品露脸3p普通话| 国产亚洲国产精品二区| 亚洲精品久久久久国色天香| 一边捏奶头一边高潮视频| 久久精品国产亚洲av麻豆四虎| 视频日本一区二区三区| 在线观看视频一区二区三区| 亚洲国产成人精品无色码| 亚洲自拍偷拍福利小视频| 少妇无套内射中出视频| 国产精品久久久天天影视香蕉| 成人免费看片又大又黄| 欧美成人精品一级在线观看| 久久久免费精品国产色夜| 日韩在线一区二区不卡视频| 亚洲天堂一区二区成人在线 | 国产极品粉嫩福利姬萌白酱| 国产尤物av尤物在线观看| 亚洲av片在线免费观看| 亚洲av成人一区二区三区| 无码专区 人妻系列 在线| 亚洲综合色婷婷中文字幕| 国产精成A品人V在线播放| 一区二区精品久久蜜精品| 国产精品亚欧美一区二区三区| 自拍视频在线观看一区| 久操线在视频在线观看|