Harcode backend in demo scripts
This commit is contained in:
parent
cb80a1adbf
commit
b261385bb7
@ -1,3 +1,9 @@
|
||||
# flake8: noqa
|
||||
import os
|
||||
|
||||
# Set backend env to torch
|
||||
os.environ["KERAS_BACKEND"] = "torch"
|
||||
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
import torch.optim as optim
|
||||
@ -5,6 +11,7 @@ from keras_core import layers
|
||||
import keras_core
|
||||
import numpy as np
|
||||
|
||||
|
||||
# Model / data parameters
|
||||
num_classes = 10
|
||||
input_shape = (28, 28, 1)
|
||||
|
@ -1,4 +1,9 @@
|
||||
# flake8: noqa
|
||||
import os
|
||||
|
||||
# Set backend env to torch
|
||||
os.environ["KERAS_BACKEND"] = "torch"
|
||||
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
import torch.optim as optim
|
Loading…
Reference in New Issue
Block a user