Browse Source

Merge pull request #175 from tpoisonooo:fix-spell-error

GitOrigin-RevId: fe649676ac
release-1.5
liuke Megvii Engine Team 3 years ago
parent
commit
0baf6b0d63
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      imperative/python/megengine/quantization/fake_quant.py
  2. +1
    -1
      src/core/test/graph/eager_eval.cpp

+ 2
- 2
imperative/python/megengine/quantization/fake_quant.py View File

@@ -61,14 +61,14 @@ class _FakeQuantize(Module):
def fake_quant_forward(self, inp, qparams: QParams = None):
raise NotImplementedError

def normal_foward(self, inp, qparams: QParams = None):
def normal_forward(self, inp, qparams: QParams = None):
return inp

def forward(self, inp, qparams: QParams = None):
if self.enabled:
return self.fake_quant_forward(inp, qparams=qparams)
else:
return self.normal_foward(inp, qparams=qparams)
return self.normal_forward(inp, qparams=qparams)


class TQT(_FakeQuantize, QParamsModuleMixin):


+ 1
- 1
src/core/test/graph/eager_eval.cpp View File

@@ -495,7 +495,7 @@ TEST_F(TestGraphEagerReeval, MemoryAlloc) {
// | +--> 8 -> 8
// |-----> x1(fwd) -> 8 -|
// total usage : 63 + (16 after the first iteration)
// x might has iteration i's memory, but x0/x1 foward i-1's memory
// x might has iteration i's memory, but x0/x1 forward i-1's memory
size_t length = reserve / (sizeof(dt_int32) * 5 * 16);
auto host_x = std::make_shared<HostTensorND>(cn, dtype::Int32());
HostTensorND host_val;


Loading…
Cancel
Save