19 Matching Annotations
  1. Jul 2020
  2. Jun 2020
  3. Mar 2020
  4. Feb 2020
    1. try: self.write('{indent}Modified var:.. {name} = {}, {value_repr}'.format(locals()['frame'].f_locals[name].shape, **locals())) except AttributeError: # in case built-in objects don't have .shape, e.g. int, list self.write('{indent}Modified var:.. {name} = {value_repr}'.format(**locals()))

      try: self.write('{indent}Modified var:.. {name} = {}, {value_repr}'.format( locals()['frame'].f_locals[name].shape, locals())) except AttributeError: # in case built-in objects don't have .shape, e.g. int, list try: self.write('{indent}Modified var:.. {name} = {}, {value_repr}'.format( len(locals()['frame'].f_locals[name]), locals())) except TypeError: self.write('{indent}Modified var:.. {name} = {value_repr}'.format(**locals()))

  5. Dec 2019
  6. Apr 2019
    1. We then explore the generalization abil-ity of the model to other datasets, just retraining thesoftmax classi er on top. As such, this is a form of su-pervised pre-training, which contrasts with the unsu-pervised pre-training methods popularized by (Hintonet al., 2006) and others (Bengio et al., 2007; Vincentet al., 2008). The generalization ability of convnet fea-tures is also explored in concurrent work by (Donahueet al., 2013)

      ??

    1. ;b)canbe mathematically understood as a conditional transforma-tion operation: conditioned on targeta, extract informa-tion from the sourcesb,i.e.source-target-awaremessagepassing

      ??

  7. Sep 2018
    1. 这是另一个也许令人惊讶的运用名称修饰的例子:_MangledGlobal__mangled = 23 class MangledGlobal: def test(self): return __mangled >>> MangledGlobal().test() 23 在这个例子中,我声明了一个名为_MangledGlobal__mangled的全局变量。然后我在名为MangledGlobal的类的上下文中访问变量。由于名称修饰,我能够在类的test()方法内,以__mangled来引用_MangledGlobal__mangled全局变量。Python解释器自动将名称__mangled扩展为_MangledGlobal__mangled,因为它以两个下划线字符开头。这表明名称修饰不是专门与类属性关联的。它适用于在类上下文中使用的两个下划线字符开头的任何名称。

      ??????