Skip to content

Commit

Permalink
Fixing some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislemke committed Nov 9, 2022
1 parent b4aabac commit 61a72f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions autoembedder/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,12 @@ def __predict(
float: Loss value.
"""

device = (
torch.device(
"cuda"
if torch.cuda.is_available()
else "mps"
if torch.backends.mps.is_available() and parameters.get("use_mps", 0) == 1
else "cpu"
),
device = torch.device(
"cuda"
if torch.cuda.is_available()
else "mps"
if torch.backends.mps.is_available() and parameters.get("use_mps", 0) == 1
else "cpu"
)

with torch.no_grad():
Expand Down
2 changes: 1 addition & 1 deletion example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
"source": [
"parameters = {\n",
" \"hidden_layers\": [[25, 20], [20, 10]],\n",
" \"epochs\": 1,\n",
" \"epochs\": 10,\n",
" \"lr\": 0.0001,\n",
" \"verbose\": 1,\n",
" \"target\": \"Class\",\n",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "Autoembedder"
version = "0.1.13"
version = "0.1.14"
description = "PyTorch autoencoder with additional embeddings layer for categorical data."
authors = ["Christopher Lemke <chris@syhbl.mozmail.com>"]
license = "MIT"
Expand Down

0 comments on commit 61a72f8

Please sign in to comment.