https://github.com/Microsoft/CNTK
Revision 7eb210162f27892e39befc7d96f49213c34bc6db authored by Frank Seide on 12 February 2018, 19:53:46 UTC, committed by Frank Seide on 12 February 2018, 19:53:46 UTC
1 parent bd50768
Raw File
Tip revision: 7eb210162f27892e39befc7d96f49213c34bc6db authored by Frank Seide on 12 February 2018, 19:53:46 UTC
GetSubBatches() no longer tries to read in small pieces, now that the underlying issue is fixed
Tip revision: 7eb2101
gre.py
from greenlet import greenlet

c = 0
def f1():
  global c
  for i in range(20):
    c += 1
    print("f1", c)
    gr2.switch()

def f2():
  global c
  for i in range(20):
    c += 1
    print("f2", c)
    gr1.switch()

gr1 = greenlet(f1)
gr2 = greenlet(f2)
gr1.switch()
print("done")
back to top