Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
张 建国
onn在线训练
Commits
a457886e
Commit
a457886e
authored
Jun 19, 2019
by
Alison Carrera
Browse files
Added new contextual bandit algorithm and updated example notebook.
parent
ed53456a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
ONN_Usage_Example.ipynb
View file @
a457886e
This diff is collapsed.
Click to expand it.
onn/OnlineNeuralNetwork.py
View file @
a457886e
...
@@ -153,7 +153,7 @@ class ONN(nn.Module):
...
@@ -153,7 +153,7 @@ class ONN(nn.Module):
class
ONN_THS
(
ONN
):
class
ONN_THS
(
ONN
):
def
__init__
(
self
,
features_size
,
max_num_hidden_layers
,
qtd_neuron_per_hidden_layer
,
n_classes
,
b
=
0.99
,
n
=
0.01
,
def
__init__
(
self
,
features_size
,
max_num_hidden_layers
,
qtd_neuron_per_hidden_layer
,
n_classes
,
b
=
0.99
,
n
=
0.01
,
s
=
0.2
,
e
=
[
0.5
,
0.35
,
0.2
,
0.1
],
use_cuda
=
False
):
s
=
0.2
,
e
=
[
0.5
,
0.35
,
0.2
,
0.1
,
0.05
],
use_cuda
=
False
):
super
().
__init__
(
features_size
,
max_num_hidden_layers
,
qtd_neuron_per_hidden_layer
,
n_classes
,
b
=
b
,
n
=
n
,
s
=
s
,
super
().
__init__
(
features_size
,
max_num_hidden_layers
,
qtd_neuron_per_hidden_layer
,
n_classes
,
b
=
b
,
n
=
n
,
s
=
s
,
use_cuda
=
use_cuda
)
use_cuda
=
use_cuda
)
self
.
e
=
e
self
.
e
=
e
...
...
setup.py
View file @
a457886e
...
@@ -6,7 +6,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
...
@@ -6,7 +6,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description
=
f
.
read
()
long_description
=
f
.
read
()
setup
(
name
=
'onn'
,
setup
(
name
=
'onn'
,
version
=
'0.1.
1
'
,
version
=
'0.1.
3
'
,
description
=
'Online Neural Network'
,
description
=
'Online Neural Network'
,
url
=
'https://github.com/alison-carrera/onn'
,
url
=
'https://github.com/alison-carrera/onn'
,
author
=
'Alison Carrera'
,
author
=
'Alison Carrera'
,
...
...
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