Skip to content

Commit 49fd351

Browse files
committed
Revert "import __future__.annotations to keep up with haiku==0.0.14"
This reverts commit 00d27d4.
1 parent 00d27d4 commit 49fd351

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

haiku/haiku_simple.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
The example code is based on https://github.com/deepmind/dm-haiku/blob/master/examples/mnist.py
99
"""
1010

11-
from __future__ import annotations
12-
13-
from collections.abc import Generator
14-
from collections.abc import Mapping
1511
import os
1612
from typing import Any
13+
from typing import Generator
14+
from typing import Mapping
15+
from typing import Tuple
1716
import urllib
1817

1918
import jax
@@ -120,7 +119,7 @@ def update(
120119
params: hk.Params,
121120
opt_state: OptState,
122121
batch: Batch,
123-
) -> tuple[hk.Params, OptState]:
122+
) -> Tuple[hk.Params, OptState]:
124123
"""Learning rule (stochastic gradient descent)."""
125124
grads = jax.grad(loss)(params, batch)
126125
updates, opt_state = opt.update(grads, opt_state)

0 commit comments

Comments
 (0)