-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add linear layer to lstm network
BREAKING CHANGES
- Loading branch information
Showing
64 changed files
with
922 additions
and
3,211 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
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
from pathlib import Path as _PyPath | ||
from typing import Iterable, Optional | ||
|
||
from elasticai.creator.hdl.translatable import File, Path | ||
|
||
|
||
class OnDiskFile(File): | ||
def __init__(self, full_path: str): | ||
self._full_path = full_path | ||
|
||
def write_text(self, text: Iterable[str]) -> None: | ||
full_path = _PyPath(self._full_path) | ||
folder = full_path.parent | ||
if not folder.exists(): | ||
os.makedirs(folder) | ||
with open(full_path, "w") as f: | ||
f.writelines((f"{line}\n" for line in text)) | ||
|
||
|
||
class OnDiskPath(Path): | ||
def __init__(self, name: str, parent: str = "."): | ||
self._full_path = f"{parent}/{name}" | ||
|
||
def create_subpath(self, name: str) -> "Path": | ||
return OnDiskPath(name, parent=self._full_path) | ||
|
||
def as_file(self, suffix: str) -> "File": | ||
return OnDiskFile(full_path=f"{self._full_path}{suffix}") |
Empty file.
Empty file.
Empty file.
25 changes: 0 additions & 25 deletions
25
elasticai/creator/tests/integration/nn/test_parametrize_convolution.py
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.