Platform
Solutions
Resources
Pricing
Sign in
Sign up
Robert Plummer
Workspace
Fork
Published
By
Robert Plummer
Edited
Apr 12, 2022
Insert cell
Insert cell
{
try
{
const
net
=
new
brain
.
NeuralNetworkGPU
(
)
;
return
net
.
train
(
[
{
input
:
[
1
,
0
]
,
output
:
[
1
]
,
}
,
{
input
:
[
0
,
0
]
,
output
:
[
0
]
,
}
,
{
input
:
[
1
,
1
]
,
output
:
[
0
]
,
}
,
{
input
:
[
0
,
1
]
,
output
:
[
1
]
,
}
,
]
)
;
}
catch
(
e
)
{
return
e
;
}
}
Insert cell
Insert cell
Insert cell
One platform
to build and deploy the best data apps
Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
brain
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
gpu
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML