Closed ceyyso163 closed 4 years ago
net.hybridize() x = mx.ndarray.random.uniform(shape=(1, 3, 48, 144)) net(x, mx.ndarray.zeros((1, 9)), mx.ndarray.ones((1,)) * 9) net.export('ocr')
hybridize后再export报“Please first call block.hybridize() and then run forward with this block at least once before calling export.”错误
@ceyyso163 目前实现 transformer 有用到 python 的动态控制流,所以那些自定义 block 都没有使用 HybridBlock,暂时无法通过 hybridize 生成静态图。
net.hybridize() x = mx.ndarray.random.uniform(shape=(1, 3, 48, 144)) net(x, mx.ndarray.zeros((1, 9)), mx.ndarray.ones((1,)) * 9) net.export('ocr')
hybridize后再export报“Please first call block.hybridize() and then run forward with this block at least once before calling export.”错误