커피 한잔 사주세요😄
*메모:
- 내 게시물에 add()에 대한 설명이 나와 있습니다.
- 내 게시물은 sub()를 설명합니다.
- 내 게시물에서는 div()에 대해 설명합니다.
- 내 게시물에서는 나머지()에 대해 설명합니다.
- 내 게시물에서는 fmod()에 대해 설명합니다.
mul()은 0개 이상의 요소나 스칼라로 구성된 0D 이상의 D 텐서 또는 0개 이상의 요소와 스칼라로 구성된 0D 이상의 D 텐서 중 두 개와 곱셈을 수행할 수 있습니다. 아래와 같이 0개 이상의 요소로 구성된 0D 이상의 D 텐서를 가져옵니다.
*메모:
- mul()은 토치나 텐서와 함께 사용할 수 있습니다.
- 토치(유형: 텐서 또는 int, float, complex 또는 bool의 스칼라)를 사용하거나 텐서(유형: int, float, complex 또는 bool의 텐서)를 사용하는 첫 번째 인수(입력)(필수).
- torch의 두 번째 인수 또는 텐서의 첫 번째 인수는 other(필수 유형: 텐서 또는 int, float, complex 또는 bool의 스칼라)입니다.
- 토치에 out 인수가 있습니다(Optional-Default:None-Type:tensor):
*메모:
- out=을 사용해야 합니다.
- 내 게시물이 주장을 설명합니다.
- Multiply()는 mul()의 별칭입니다.
import torch tensor1 = torch.tensor([9, 7, 6]) tensor2 = torch.tensor([[4, -4, 3], [-2, 5, -5]]) torch.mul(input=tensor1, other=tensor2) tensor1.mul(other=tensor2) # tensor([[36, -28, 18], [-18, 35, -30]]) torch.mul(input=9, other=tensor2) # tensor([[36, -36, 27], [-18, 45, -45]]) torch.mul(input=tensor1, other=4) # tensor([36, 28, 24]) torch.mul(input=9, other=4) # tensor(36) tensor1 = torch.tensor([9., 7., 6.]) tensor2 = torch.tensor([[4., -4., 3.], [-2., 5., -5.]]) torch.mul(input=tensor1, other=tensor2) # tensor([[36., -28., 18.], [-18., 35., -30.]]) torch.mul(input=9., other=tensor2) # tensor([[36., -36., 27.], [-18., 45., -45.]]) torch.mul(input=tensor1, other=4.) # tensor([36., 28., 24.]) torch.mul(input=9., other=4.) # tensor(36.) tensor1 = torch.tensor([9.+0.j, 7.+0.j, 6.+0.j]) tensor2 = torch.tensor([[4.+0.j, -4.+0.j, 3.+0.j], [-2.+0.j, 5.+0.j, -5.+0.j]]) torch.mul(input=tensor1, other=tensor2) # tensor([[36.+0.j, -28.+0.j, 18.+0.j], # [-18.+0.j, 35.+0.j, -30.+0.j]]) torch.mul(input=9.+0.j, other=tensor2) # tensor([[36.+0.j, -36.+0.j, 27.+0.j], # [-18.+0.j, 45.+0.j, -45.+0.j]]) torch.mul(input=tensor1, other=4.+0.j) # tensor([36.+0.j, 28.+0.j, 24.+0.j]) torch.mul(input=9.+0.j, other=4.+0.j) # tensor(36.+0.j) tensor1 = torch.tensor([True, False, True]) tensor2 = torch.tensor([[False, True, False], [True, False, True]]) torch.mul(input=tensor1, other=tensor2) # tensor([[False, False, False], # [True, False, True]]) torch.mul(input=True, other=tensor2) # tensor([[False, True, False], [True, False, True]]) torch.mul(input=tensor1, other=False) # tensor([False, False, False]) torch.mul(input=True, other=False) # tensor(False)
위 내용은 PyTorch의 멀티의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

Python은 해석 된 언어이지만 편집 프로세스도 포함됩니다. 1) 파이썬 코드는 먼저 바이트 코드로 컴파일됩니다. 2) 바이트 코드는 Python Virtual Machine에 의해 해석되고 실행됩니다. 3)이 하이브리드 메커니즘은 파이썬이 유연하고 효율적이지만 완전히 편집 된 언어만큼 빠르지는 않습니다.

USEAFORLOOPHENTERATINGOVERASERASERASPECIFICNUMBEROFTIMES; USEAWHILLOOPWHENTINUTIMONDITINISMET.FORLOOPSAREIDEALFORKNOWNSEDINGENCENCENS, WHILEWHILELOOPSSUITSITUATIONS WITHERMINGEDERITERATIONS.

Pythonloopscanleadtoerrors likeinfiniteloops, modifyinglistsdizeration, off-by-by-byerrors, zero-indexingissues, andnestedloopineficiencies.toavoidthese : 1) aing'i

ForloopSareadvantageForkNowniTerations 및 Sequence, OffingSimplicityAndInamicConditionSandunkNowniTitionS 및 ControlOver Terminations를 제공합니다

Pythonusesahybridmodelofilationandlostretation : 1) ThePyThoninterPretreCeterCompileSsourcodeIntOplatform-IndependentBecode.

Pythonisbothingretedandcompiled.1) 1) it 'scompiledtobytecodeforportabilityacrossplatforms.2) thebytecodeisthentenningreted, withfordiNamictyTeNgreted, WhithItmayBowerShiledlanguges.

forloopsareusedwhendumberofitessiskNowninadvance, whilewhiloopsareusedwhentheationsdepernationsorarrays.2) whiloopsureatableforscenarioScontiLaspecOndCond


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

Atom Editor Mac 버전 다운로드
가장 인기 있는 오픈 소스 편집기

WebStorm Mac 버전
유용한 JavaScript 개발 도구

MinGW - Windows용 미니멀리스트 GNU
이 프로젝트는 osdn.net/projects/mingw로 마이그레이션되는 중입니다. 계속해서 그곳에서 우리를 팔로우할 수 있습니다. MinGW: GCC(GNU Compiler Collection)의 기본 Windows 포트로, 기본 Windows 애플리케이션을 구축하기 위한 무료 배포 가능 가져오기 라이브러리 및 헤더 파일로 C99 기능을 지원하는 MSVC 런타임에 대한 확장이 포함되어 있습니다. 모든 MinGW 소프트웨어는 64비트 Windows 플랫폼에서 실행될 수 있습니다.

Eclipse용 SAP NetWeaver 서버 어댑터
Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

VSCode Windows 64비트 다운로드
Microsoft에서 출시한 강력한 무료 IDE 편집기