Skip to content

Commit

Permalink
single step
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Dec 8, 2021
1 parent ba3eef0 commit 682d2b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions nn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ def forward(self, x):

from __future__ import annotations
from typing import Dict, Any, Optional, List, Tuple, Union, Set, Iterator, Iterable
from returnn.tf.util.data import * # Dim, Data, and others
from returnn.util.basic import NotSpecified, OptionalNotImplementedError
# noinspection PyUnresolvedReferences
from returnn.tf.util.data import Dim, SpatialDim, FeatureDim
from tensorflow.python.util import nest


Expand Down
4 changes: 1 addition & 3 deletions nn/rec.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ def __init__(self, out_dim: nn.Dim, **kwargs):
def make_layer_dict(
self, source: nn.LayerRef, *, state: nn.LayerState) -> nn.LayerDictRaw:
"""make layer"""
# TODO specify per-step, how? this should also work without rec loop, when there is no time dim.
# https://github.com/rwth-i6/returnn/issues/847
return super().make_layer_dict(source, state=state, axis=None)
return super().make_layer_dict(source, state=state, axis=nn.single_step_dim)


class ZoneoutLSTM(_Rec):
Expand Down

0 comments on commit 682d2b5

Please sign in to comment.