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
## Imports: | |
from PIL import Image | |
import sclblonnx as so | |
import numpy as np | |
## Creating the image difference ONNX graph: | |
# Start with the empty graph: | |
g = so.empty_graph() |
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
# Imports | |
import numpy as np | |
from sklearn.linear_model import LinearRegression | |
# Data generation y = 10 + 2*x1 -.5*x2 + noise: | |
np.random.seed(0) | |
n = 100 | |
x1 = np.random.uniform(0,10,(n,)) | |
x2 = np.random.uniform(0,10,(n,)) | |
y = 10 + 2 * x1 -.5*x2 + np.random.normal(0,1,(n,)) |
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
# imports | |
import sclblpy as sp | |
import numpy as np | |
from sklearn.linear_model import LinearRegression | |
# generate some data: | |
n = 100 | |
x = np.random.uniform(0,10,(n,)) | |
# y = 10 + 2x + noise: |