File tree Expand file tree Collapse file tree 3 files changed +27
-5
lines changed Expand file tree Collapse file tree 3 files changed +27
-5
lines changed Original file line number Diff line number Diff line change 22* .npz
33* .pyc
44* ~
5+
56.DS_Store
67.idea
78.spyproject /
9+ .pytest_cache /
10+
11+ venv /
812build /
9- dist
13+ data /
14+ dist /
1015docs /_build
1116tensorlayer.egg-info
12- tensorlayer /__pacache__
13- venv /
14- .pytest_cache /
17+ tensorlayer /__pycache__
18+
1519update_tl.bat
1620update_tl.py
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22
3+ import six
34import time
5+ from abc import ABCMeta , abstractmethod
46
57import numpy as np
68import tensorflow as tf
3840]
3941
4042
41- class LayersConfig :
43+ @six .add_metaclass (ABCMeta )
44+ class LayersConfig (object ):
45+
4246 tf_dtype = tf .float32 # TensorFlow DType
4347 set_keep = {} # A dictionary for holding tf.placeholders
4448
49+ @abstractmethod
50+ def __init__ (self ):
51+ pass
52+
4553
4654try : # For TF12 and later
4755 TF_GRAPHKEYS_VARIABLES = tf .GraphKeys .GLOBAL_VARIABLES
Original file line number Diff line number Diff line change 66import tensorlayer as tl
77
88
9+ class Core_Helpers_Test (unittest .TestCase ):
10+
11+ def test_LayersConfig (self ):
12+ with self .assertRaises (TypeError ):
13+ tl .layers .LayersConfig ()
14+
15+ self .assertIsInstance (tl .layers .LayersConfig .tf_dtype , tf .DType )
16+ self .assertIsInstance (tl .layers .LayersConfig .set_keep , dict )
17+
18+
919class Layer_Core_Test (unittest .TestCase ):
1020
1121 @classmethod
You can’t perform that action at this time.
0 commit comments