Skip to content

Commit

Permalink
Fix middle hidden (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
zkh2016 authored Aug 28, 2023
1 parent d435097 commit abc7b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bmtrain/block_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def next_module(self):
return self._next_module[self._ref_count-1]

def backward_release(self, flag):
if self._ref_count == 1:
if self._ref_count == 1 and self._backward_block_ctx is not None:
self._backward_block_ctx.exit(flag, True)
config['load_stream'].record_event(config['load_event'])
self._ref_count -= 1
Expand Down

0 comments on commit abc7b90

Please sign in to comment.