#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2020/9/24 16:50
# @Author : zhaoyLi
# @FileName: test2.py
# @Software: PyCharm
# @Blog :https://blog.csdn.net/qq_37405118
# @Purpose :验证element-wise multiplicationimport torchx = torch.randn(1,3,2,2)
y = torch.tensor([[[[1.0]],[[2.0]],[[3.0]]]]) #1,3,1,1
print(y.shape)
z = torch.mul(x,y)
print(x,'\n',y,'\n',z)
print(z.shape)#1,3,2,2#############################################**输出**##########################################
E:\Anconda\python.exe "C:/Users/MR-LI/Desktop/program practice/9-24-2020/test2.py"
torch.Size([1, 3, 1, 1])
tensor([[[[ 0.6868, 0.0787],[ 0.4054, 0.4241]],[[-1.4643, -1.7135],[ 0.2437, 0.4013]],[[-0.6950, 1.0245],[ 0.8811, 0.7769]]]]) tensor([[[[1.]],[[2.]],[[3.]]]]) tensor([[[[ 0.6868, 0.0787],[ 0.4054, 0.4241]],[[-2.9287, -3.4269],[ 0.4874, 0.8026]],[[-2.0849, 3.0734],[ 2.6432, 2.3306]]]])
torch.Size([1, 3, 2, 2])
详细解决方案
element-wise multiplication
热度:94 发布时间:2023-11-11 10:03:18.0
相关解决方案
- soap调用webservice,报错:Root element of a SOAP message must be: 'http://schemas.xmls,该怎么处理
- clearcase 中怎么查看一个element 是symbolic link 还是 实际的file element
- 如何区分Struts Action Element?(已解决)
- IE Developer Toolbar不能用“Select Element By Click"功能
- 请问:The content of element type " " must match "EMPTY"
- IE Developer Toolbar不能用“Select Element By Click"效能
- 分享一个在线的HTML5元素在线试验 : HTML5 Element Quiz
- Ajax异常:Sys.ArgumentNullException: Value cannot be null. Parameter name: element
- 架构证验警告: 来自命名空间“xxx”、名为“XXX”的架构项“element”无效。在此架构中不能引用命名空间“xxx”
- WCF异常SerializationException:“Element”命名空间 中的xxx并非所需元素
- HTML Parsing Error: Unable to modify the parent container element before the chi,该如何处理
- 解决 element.style覆盖样式有关问题
- Unrecognized xbean element 地图ping: beans in namespace http://xfire.codehaus.org/config/1.0
- element.style覆盖样式解决办法
- web service 请求https地址失误There must be a method name element
- The prefix "aop" for element "aop:config" is not bound
- prototype里Form.Element.focus(element) 方法是否实现异常
- EXT核心API详解(3)-Ext.Element
- 【ExtJS 4.1】Element.load()加载不成功,该如何处理
- this.optional(element) 代表什么解决方案
- extJs 2.0学习札记(Element.js篇)
- extJs 2.0学习札记(Ext.Element API总结)
- 解决:The content of element type "web-app" must match "(icon?display
- 解决The content of element type "web-app" must match "(icon?display
- The content of element type "struts-config" must match "(display-name?descripti
- Wise 封装细节
- how to verify an element does NOT exist in Selenium 二
- The content of element type "web-app" must match…有关问题之解决方法
- Invalid content was found starting with element 'taglib'.解决方法
- JSONObject put accumulate element 步骤区别