Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit ddb9665

Browse files
afrozenatorcopybara-github
authored andcommitted
Internal change.
PiperOrigin-RevId: 247119337
1 parent 280d2f7 commit ddb9665

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

tensor2tensor/problems_colab.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# coding=utf-8
2+
# Copyright 2019 The Tensor2Tensor Authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
"""Access T2T Problems."""
17+
from __future__ import absolute_import
18+
from __future__ import division
19+
from __future__ import print_function
20+
21+
from tensor2tensor.data_generators import all_problems
22+
from tensor2tensor.utils import registry
23+
24+
25+
def problem(name):
26+
return registry.problem(name)
27+
28+
29+
def available():
30+
return sorted(registry.list_problems())
31+
32+
33+
# Import problem modules
34+
_modules = list(all_problems.MODULES)
35+
36+
all_problems.import_modules(_modules)

0 commit comments

Comments
 (0)