{"id":246911,"date":"2020-12-21T04:36:49","date_gmt":"2020-12-20T20:36:49","guid":{"rendered":"http:\/\/4563.org\/?p=246911"},"modified":"2020-12-21T04:36:49","modified_gmt":"2020-12-20T20:36:49","slug":"super-__init__%e5%92%8c-superclassobj-__init__%e6%9c%89%e4%bb%80%e4%b9%88%e5%8c%ba%e5%88%ab%e5%95%8a","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=246911","title":{"rendered":"super().__init__()\u548c super(class,obj).__init__()\u6709\u4ec0\u4e48\u533a\u522b\u554a"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  super().__init__()\u548c super(class,obj).__init__()\u6709\u4ec0\u4e48\u533a\u522b\u554a               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Frankhong <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<pre><code>class AttnDecoderRNN(nn.Module):     def __init__(self, hidden_size, output_size, dropout_p=0.1, max_length=MAX_LENGTH):         # super().__init__()         super(AttnDecoderRNN, self).__init__() <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4804631\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Trim21 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5b9e\u9645\u6ca1\u4ec0\u4e48\u533a\u522b\uff0c\u4e0d\u52a0\u53c2\u6570\u7684\u662f\u6bd4\u8f83\u65b0\u7684\u5199\u6cd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4804632\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hsfzxjy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e8b\u5b9e\u4e0a\u4f60\u53ef\u4ee5 super(nn.Module, self).__init__()\u76f4\u63a5\u8c03\u7528\u7956\u7236\u7684\u51fd\u6570                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4804633\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yuruizhe <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f8b\u5b50\u4e2d\u662f\u5355\u7ee7\u627f\uff0c\u6240\u4ee5\u662f\u4e00\u6837\u7684\uff0c\u5982\u679c\u662f\u591a\u7ee7\u627f\uff0csuper(father_class,self)\u8868\u793a self \u7684 MRO \u7684\u4e0b\u4e00\u4e2a\u7236\u7c7b\uff0c\u53bb\u8c03\u7528\u4e0b\u4e00\u4e2a\u7236\u7c7b\u7684\u521d\u59cb\u5316\u51fd\u6570                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>super().__init__(&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/246911"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=246911"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/246911\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=246911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=246911"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=246911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}