Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
87adcc46
You need to sign in or sign up before continuing.
Commit
87adcc46
authored
Dec 31, 2015
by
ppwwyyxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use abcmeta
parent
1f0670e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
tensorpack/dataflow/base.py
tensorpack/dataflow/base.py
+4
-1
tensorpack/utils/callback.py
tensorpack/utils/callback.py
+2
-1
tensorpack/utils/sessinit.py
tensorpack/utils/sessinit.py
+3
-1
No files found.
tensorpack/dataflow/base.py
View file @
87adcc46
...
@@ -3,11 +3,14 @@
...
@@ -3,11 +3,14 @@
# File: base.py
# File: base.py
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
from
abc
import
abstractmethod
from
abc
import
abstractmethod
,
ABCMeta
__all__
=
[
'DataFlow'
]
__all__
=
[
'DataFlow'
]
class
DataFlow
(
object
):
class
DataFlow
(
object
):
__metaclass__
=
ABCMeta
@
abstractmethod
@
abstractmethod
def
get_data
(
self
):
def
get_data
(
self
):
"""
"""
...
...
tensorpack/utils/callback.py
View file @
87adcc46
...
@@ -8,13 +8,14 @@ import sys
...
@@ -8,13 +8,14 @@ import sys
import
numpy
as
np
import
numpy
as
np
import
os
import
os
import
time
import
time
from
abc
import
abstractmethod
from
abc
import
abstractmethod
,
ABCMeta
from
.
import
create_test_session
from
.
import
create_test_session
from
.naming
import
*
from
.naming
import
*
import
logger
import
logger
class
Callback
(
object
):
class
Callback
(
object
):
__metaclass__
=
ABCMeta
running_graph
=
'train'
running_graph
=
'train'
""" The graph that this callback should run on.
""" The graph that this callback should run on.
Either 'train' or 'test'
Either 'train' or 'test'
...
...
tensorpack/utils/sessinit.py
View file @
87adcc46
...
@@ -3,12 +3,14 @@
...
@@ -3,12 +3,14 @@
# File: sessinit.py
# File: sessinit.py
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
from
abc
import
abstractmethod
from
abc
import
abstractmethod
,
ABCMeta
import
numpy
as
np
import
numpy
as
np
import
tensorflow
as
tf
import
tensorflow
as
tf
import
logger
import
logger
class
SessionInit
(
object
):
class
SessionInit
(
object
):
__metaclass__
=
ABCMeta
@
abstractmethod
@
abstractmethod
def
init
(
self
,
sess
):
def
init
(
self
,
sess
):
""" Method to initialize a session"""
""" Method to initialize a session"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment