-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from OpenMined/vvm/update-serde
Update serde, fix with-node example
- Loading branch information
Showing
5 changed files
with
16 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,8 @@ | |
|
||
<title>syft.js Example</title> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tf.min.js"></script> | ||
<!-- NOTE: TFJS version must match with one in package-lock.json --> | ||
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tf.min.js"></script> | ||
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script> | ||
</head> | ||
<body> | ||
|
@@ -71,7 +72,7 @@ <h1>syft.js/grid.js testing</h1> | |
>. | ||
</p> | ||
<input type="text" id="grid-server" value="ws://localhost:3000" /> | ||
<input type="text" id="protocol" value="5259950754" /> | ||
<input type="text" id="protocol" value="50801316202" /> | ||
<button id="connect">Connect to grid.js server</button> | ||
<div id="app"> | ||
<button id="disconnect">Disconnect</button> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
global.tf = { | ||
tensor: (value, shape, type) => { | ||
console.log('Created a tensor!', value, shape, type); | ||
}, | ||
add: jest.fn(), | ||
abs: jest.fn() | ||
}; | ||
import * as tf from '@tensorflow/tfjs'; | ||
const tensor = tf.tensor; | ||
jest.spyOn(tf, 'tensor').mockImplementation((values, shape, dtype) => { | ||
let t = tensor(values, shape, dtype); | ||
// override id to always return same value | ||
Object.defineProperty(t, 'id', { | ||
value: 42 | ||
}); | ||
return t; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters