catniff 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/dist/nn.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -112,6 +112,7 @@ All available APIs are in [`./src/`](./src/) if you want to dig deeper.
112
112
 
113
113
  ## Examples
114
114
 
115
+ * [Shakespeare-style text generator](https://github.com/nguyenphuminh/shakespeare-lm).
115
116
  * [Simple neural net for XOR calculation](./examples/xornet.js).
116
117
  * [Tensors](./examples/tensors.js).
117
118
  * [Optimizer](./examples/optim.js).
package/dist/nn.js CHANGED
@@ -193,7 +193,7 @@ const state = {
193
193
  const value = model[key];
194
194
  const fullKey = prefix ? `${prefix}.${key}` : key;
195
195
  if (value instanceof core_1.Tensor && stateDict[fullKey]) {
196
- value.replace(new core_1.Tensor(stateDict[fullKey]));
196
+ value.replace(new core_1.Tensor(stateDict[fullKey], { device: value.device }));
197
197
  }
198
198
  else if (typeof value === "object" && value !== null) {
199
199
  this.loadStateDict(value, stateDict, fullKey, visited);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catniff",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "A small Torch-like deep learning framework for Javascript",
5
5
  "main": "index.js",
6
6
  "scripts": {