"use strict";(self.webpackChunkrspress_doc_template=self.webpackChunkrspress_doc_template||[]).push([["7014"],{65425:function(n,e,s){s.r(e);var i=s(85893),r=s(50065);function l(n){let e=Object.assign({h1:"h1",a:"a",pre:"pre",code:"code",span:"span",p:"p"},(0,r.ah)(),n.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(e.h1,{id:"quantizationfuse_known_modules",children:[(0,i.jsx)(e.a,{className:"header-anchor","aria-hidden":"true",href:"#quantizationfuse_known_modules",children:"#"}),"quantization.fuse_known_modules"]}),"\n",(0,i.jsx)(e.pre,{className:"code",children:(0,i.jsx)(e.pre,{className:"shiki css-variables has-line-number",style:{backgroundColor:"var(--shiki-color-background)"},tabIndex:"0",children:(0,i.jsxs)(e.code,{className:"language-python",meta:"",children:[(0,i.jsxs)(e.span,{className:"line line-number",children:[(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"horizon_plugin_pytorch"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:"."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"quantization"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:"."}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"fuse_known_modules "}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:"(mod_list, is_qat"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"False"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:", additional_fuser_method_mapping"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"None"}),(0,i.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:")"})]}),"\n"]})})}),"\n",(0,i.jsx)(e.p,{children:"Fuse modules."}),"\n",(0,i.jsx)(e.p,{children:"Return a list of modules that fuses the operations specified in the input module list."}),"\n",(0,i.jsx)(e.p,{children:"Fuses only the following sequence of modules:"}),"\n",(0,i.jsx)(e.p,{children:"conv, bn;"}),"\n",(0,i.jsx)(e.p,{children:"conv, bn, relu;"}),"\n",(0,i.jsx)(e.p,{children:"conv, relu;"}),"\n",(0,i.jsx)(e.p,{children:"conv, bn, add;"}),"\n",(0,i.jsx)(e.p,{children:"conv, bn, add, relu;"}),"\n",(0,i.jsx)(e.p,{children:"conv, add;"}),"\n",(0,i.jsx)(e.p,{children:"conv, add, relu;"}),"\n",(0,i.jsx)(e.p,{children:"linear, bn;"}),"\n",(0,i.jsx)(e.p,{children:"linear, bn, relu;"}),"\n",(0,i.jsx)(e.p,{children:"linear, relu;"}),"\n",(0,i.jsx)(e.p,{children:"linear, bn, add;"}),"\n",(0,i.jsx)(e.p,{children:"linear, bn, add, relu;"}),"\n",(0,i.jsx)(e.p,{children:"linear, add;"}),"\n",(0,i.jsx)(e.p,{children:"linear, add, relu."}),"\n",(0,i.jsx)(e.p,{children:"For these sequences, the first element in the output module list performs the fused operation. The rest of the elements are set to nn.Identity()"})]})}function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,r.ah)(),n.components);return e?(0,i.jsx)(e,Object.assign({},n,{children:(0,i.jsx)(l,n)})):l(n)}e.default=o,o.__RSPRESS_PAGE_META={},o.__RSPRESS_PAGE_META["latest%2Fen%2Fguide%2Fplugin%2Fplugin_api_reference%2Fqat_api%2Fhorizon_plugin_pytorch_quantization_fuse_known_modules.md"]={toc:[],title:"quantization.fuse_known_modules",frontmatter:{}}}}]);