Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OvoTools
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林帅浩
OvoTools
Commits
8ce1fe03
Commit
8ce1fe03
authored
Mar 27, 2019
by
Ilya Ovodov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
class DataSubset
parent
50d1d812
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
pytorch_tools.py
ovotools/pytorch_tools.py
+13
-0
No files found.
ovotools/pytorch_tools.py
View file @
8ce1fe03
...
@@ -17,6 +17,19 @@ class DummyTimer:
...
@@ -17,6 +17,19 @@ class DummyTimer:
def
watch
(
self
,
name
):
return
self
.
TimerWatch
(
self
,
name
)
def
watch
(
self
,
name
):
return
self
.
TimerWatch
(
self
,
name
)
class
DataSubset
:
'''
subset of base_dataset defined by indexes
'''
def
__init__
(
self
,
base_dataset
,
indexes
):
self
.
base_dataset
=
base_dataset
self
.
indexes
=
indexes
def
__len__
(
self
):
return
len
(
self
.
indexes
)
def
__getitem__
(
self
,
item
):
return
self
.
base_dataset
[
self
.
indexes
[
item
]]
class
MarginBaseLoss
:
class
MarginBaseLoss
:
'''
'''
L2-constrained Softmax Loss for Discriminative Face Verification https://arxiv.org/pdf/1703.09507
L2-constrained Softmax Loss for Discriminative Face Verification https://arxiv.org/pdf/1703.09507
...
...
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