Every line of 'conv2d pytorch' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
19 def conv2d(input, weight, bias=None, stride=1, padding=0): 20 21 return _functions.Conv2d.apply(input, weight, bias, stride, padding)
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
74 def conv2d(data, weight=None, **kwargs): 75 """Wrapper of conv2d which automatically creates weights if not given. 76 77 Parameters 78 ---------- 79 data : relay.Expr 80 The input expression. 81 82 weight : relay.Expr 83 The weight to conv2d. 84 85 kwargs : dict 86 Additional arguments. 87 88 Returns 89 ------- 90 result : relay.Expr 91 The result. 92 """ 93 name = kwargs.get("name") 94 kwargs.pop("name") 95 if not weight: 96 weight = relay.var(name + "_weight") 97 return relay.nn.conv2d(data, weight, **kwargs)
40 def fconv2d(x, w, stride, padding): 41 return F.conv2d(x, w, stride=stride, padding=padding, groups=x.size(1))