FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-python/tests/test_theano.py at master · HpcDataLab/docker-python · GitHub
HpcDataLab
/
docker-python
Public
forked from
Kaggle/docker-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docker-python
/
tests
/
test_theano.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (15 loc) · 563 Bytes
Breadcrumbs
docker-python
/
tests
/
test_theano.py
Copy path
File metadata and controls
20 lines (15 loc) · 563 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import
unittest
import
theano
from
theano
import
tensor
class
TestTheano
(
unittest
.
TestCase
):
def
test_addition
(
self
):
# Declare two symbolic floating-point scalars.
a
=
tensor
.
dscalar
()
b
=
tensor
.
dscalar
()
# Create a simple expression.
c
=
a
+
b
# Convert the expression into a callable object that takes (a,b)
# values as input and computes a value for 'c'.
f
=
theano
.
function
([
a
,
b
],
c
)
# Bind 1.5 to 'a', 2.5 to 'b', and evaluate 'c'.
self
.
assertEqual
(
4.0
,
f
(
1.5
,
2.5
))
Back
|
FazBrowse Home
|
New Git URL