Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.linear
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.learn.linear
Commits
b8cf7b0c
Commit
b8cf7b0c
authored
5 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Fixed arguments input_subtract and input_divide during serialization
parent
daccf8a0
No related branches found
No related tags found
1 merge request
!13
Fixed arguments input_subtract and input_divide during serialization
Pipeline
#39618
passed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/learn/linear/__init__.py
+5
-5
5 additions, 5 deletions
bob/learn/linear/__init__.py
with
5 additions
and
5 deletions
bob/learn/linear/__init__.py
+
5
−
5
View file @
b8cf7b0c
...
...
@@ -30,8 +30,8 @@ class Machine(_Machine_C):
__doc__
=
_Machine_C
.
__doc__
def
update_dict
(
self
,
d
):
self
.
input_sub
=
numpy
.
array
(
[
d
[
"
input_sub
"
]]
)
self
.
input_div
=
numpy
.
array
(
[
d
[
"
input_div
"
]]
)
self
.
input_sub
tract
=
numpy
.
array
(
d
[
"
input_sub
tract
"
],
dtype
=
"
float64
"
)
self
.
input_div
ide
=
numpy
.
array
(
d
[
"
input_div
ide
"
],
dtype
=
"
float64
"
)
@classmethod
def
create_from_dict
(
cls
,
d
):
...
...
@@ -40,10 +40,10 @@ class Machine(_Machine_C):
return
machine
@staticmethod
def
to_dict
(
machine
):
def
to_dict
(
machine
):
machine_data
=
dict
()
machine_data
[
"
input_sub
"
]
=
machine
.
input_sub
machine_data
[
"
input_div
"
]
=
machine
.
input_div
machine_data
[
"
input_sub
tract
"
]
=
machine
.
input_sub
tract
machine_data
[
"
input_div
ide
"
]
=
machine
.
input_div
ide
machine_data
[
"
weights
"
]
=
machine
.
weights
return
machine_data
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment