Comments (3)
What is the error you're seeing?
from nengo-dl.
def build_network(neuron_type):
with nengo.Network() as net:
# we'll make all the nengo objects in the network
# non-trainable. we could train them if we wanted, but they don't
# add any representational power so we can save some computation
# by ignoring them. note that this doesn't affect the internal
# components of tensornodes, which will always be trainable or
# non-trainable depending on the code written in the tensornode.
nengo_dl.configure_settings(trainable=True)
# the input node that will be used to feed in input images
inp = nengo.Node(nengo.processes.PresentInput(X_train, 0.1))
# add the first convolutional layer
x = nengo_dl.tensor_layer(
inp, tf.layers.conv2d, shape_in=(227, 227,3), filters=32,
kernel_size=3)
# apply the neural nonlinearity
x = nengo_dl.tensor_layer(x, neuron_type, **ens_params)
# add another convolutional layer
x = nengo_dl.tensor_layer(
x, tf.layers.conv2d, shape_in=(225, 225, 32),
filters=32, kernel_size=3)
x = nengo_dl.tensor_layer(x, neuron_type, **ens_params)
# add a pooling layer
x = nengo_dl.tensor_layer(
x, tf.layers.average_pooling2d, shape_in=(223, 223, 32),
pool_size=2, strides=2)
# add a dense layer, with neural nonlinearity.
# note that for all-to-all connections like this we can use the
# normal nengo connection transform to implement the weights
# (instead of using a separate tensor_layer). we'll use a
# Glorot uniform distribution to initialize the weights.
x, conn = nengo_dl.tensor_layer(
x, neuron_type, **ens_params, transform=nengo_dl.dists.Glorot(),
shape_in=(255,), return_conn=True)
# we need to set the weights and biases to be trainable
# (since we set the default to be trainable=False)
# note: we used return_conn=True above so that we could access
# the connection object for this reason.
net.config[x].trainable = True
net.config[conn].trainable = True
# add a dropout layer
x = nengo_dl.tensor_layer(x, tf.layers.dropout, rate=0.4)
# the final 10 dimensional class output
x = nengo_dl.tensor_layer(x, tf.layers.dense, units=1)
return net, inp, x
# construct the network
net, inp, out = build_network(softlif_neurons)
with net:
out_p = nengo.Probe(out)
# construct the simulator
minibatch_size = None
sim = nengo_dl.Simulator(net, minibatch_size=minibatch_size)
this is the code which i have edited according to my dataset.my laptop become slow download and even os ask me to close the program because of short of memory. i even become unable to copy the error trace .
from nengo-dl.
Going to close this and continue the discussion in the forum thread you started (https://forum.nengo.ai/t/memory-errors-inspite-of-very-small-dataset-in-nengo-dl/477), since this seems like a problem specific to your model/computer.
from nengo-dl.
Related Issues (20)
- AssertionError running custom neuron with TensorFlow 2.3.0 HOT 3
- Empty probes are Python lists instead of ndarrays
- Creating a simulator while keeping pretrained weights HOT 3
- Uninformative error message when using `sim.compile` on a network with no probed outputs
- Support/examples for converting or embedding Keras RNNs HOT 1
- Support scale_firing_rates with Regular/Poisson/Stochastic spiking wrappers
- Warn if converter's scale_firing_rates would skew the nonlinearities
- Support opting in to spikes on the forward pass
- Nengo version of ModelCheckpoint callback
- Use no-input nodes by default in converter
- load_params misbehaves with scale_firing_rates for some architectures HOT 1
- Converter `synapse` not applied to `neurons`-to-`TensorNode` connections HOT 1
- Converter fails with `tf.keras.applications.EfficientNet`
- Mistake in documentation
- Trainable parameters in Nengo LIF neurons HOT 2
- Which neuromorphic hardware does NengoDL simulate ?
- sim.predict make GPU full memory HOT 7
- BatchNormalization layer produces LOW accuracy
- Importing Nengo_DL in Google Colab HOT 1
- `nengo_dl` cannot import `keras.engine` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nengo-dl.