Categories
Misc

Performing Live: How AI-Based Perception Helps AVs Better Detect Speed Limits

Understanding speed limit signs may seem like a straightforward task, but it can quickly become more complex in situations in which different restrictions apply to different lanes (for example, a highway exit) or when driving in a new country. 

The post Performing Live: How AI-Based Perception Helps AVs Better Detect Speed Limits appeared first on The Official NVIDIA Blog.

Categories
Misc

GANTheftAuto: Harrison Kinsley on AI-Generated Gaming Environments

Harrison Kinsley and collaborator Daniel Kukeila created a neural network that generates its own gaming environment modeled on ‘Grand Theft Auto.’

The post GANTheftAuto: Harrison Kinsley on AI-Generated Gaming Environments appeared first on The Official NVIDIA Blog.

Categories
Misc

Best practice for simulated annealing

I am trying to implement simulated annealing using tensorflow_probability but I don’t understand how to update the transition kernel between steps correctly. I think I somehow have to use bijectors but I don’t really understand how. Can somehow explain it to me or link a working example?

submitted by /u/Dubmove
[visit reddit] [comments]

Categories
Misc

[Help please!!] Issue with TensorFlow and NumPy under Jupyter (Anaconda)

Hello everyone! I’m having an issue when using TensorFlow under Jupyter (Anaconda).

When I try to create a Bidirectional layer, I always get this issue:

“Cannot convert a symbolic Tensor (bidirectional/forward_lstm/strided_slice:0) to a NumPy array. This error may indicate that you’re trying to pass a Tensor to a NumPy call, which is not supported”

It doesn’t matter the type of bidirectional layer, I always get this issue.

Can some please help me?

Thanks in advance!

submitted by /u/IWantAGoodBattery
[visit reddit] [comments]

Categories
Misc

Considerations for Deploying AI at the Edge

There are a number of factors businesses should consider to ensure an optimized edge computing strategy and deployment.

The growth of edge computing has been a hot topic in many industries. The value of smart infrastructure can mean improvements to overall operational efficiency, safety, and even the bottom line. However, not all workloads need to be, or even should be, deployed at the edge.

Enterprises use a combination of edge computing and cloud computing when developing and deploying AI applications. AI training typically takes place in the cloud or at data centers. When customers evaluate where to deploy AI applications for inferencing they consider aspects such as latency, bandwidth, and security requirements. 

Edge computing is tailored for real-time, always-on solutions that have low latency requirements. Always-on solutions are sensors or other pieces of infrastructure that are constantly working or monitoring their environments. Examples of “always-on” solutions include networked video cameras for loss prevention, medical imaging in ERs for surgery support, or assembly line inspection in factories. Many customers have already embraced edge computing for AI applications. Read about how they are creating smarter, safer spaces.

As customers evaluate their AI strategy and where edge computing makes sense for their business, there are a number of factors they must consider to ensure an optimized deployment. These considerations include latency, scalability, remote management, security, and resiliency.

Lower Latency

Most are familiar with the idea of bringing compute to the data, not the other way around. This has a number of advantages. One of the most important is latency. Instead of losing time sending data back to the data center or the cloud, businesses process data in real time and derive intelligent insights instantly. 

For example, retailers deploying AI loss prevention solutions cannot wait seconds or longer for a response to come back from their system. They need instant alerts for an abnormal behavior so that it can be flagged and dealt with immediately. Similarly, AI solutions designed for warehouses that detect when a worker is in the wrong place or not wearing the appropriate safety equipment needs an instantaneous response.

Scalability

Creating smart spaces often means that companies are looking to run AI at tens to thousands of locations. A major challenge to this scale is limited cloud bandwidth for moving and processing information. Bandwidth cap often leads to higher costs and smaller infrastructure. With edge computing solutions, data collection, and processing happens on the local network, bandwidth is tied to the local area network (LAN) and has a much broader range of scalability. 

Remote Management

When scaling to hundreds of remote locations, one of the key considerations organizations must address is how to manage all edge systems. While some companies today have tried to employ skilled employees or contractors to handle provisioning and maintenance of edge locations, most quickly realize they need to centralize the management in order to scale. Edge management solutions make it easy for IT to provision edge systems, deploy AI software, and manage the ongoing updates needed.

Security

The security model for edge computing is almost entirely turned on its head compared to traditional security policies in the data center. While organizations can generally maintain physical security of their data center systems, edge systems are almost always freely accessible to many more people. This requires both physical hardware security processes to be put in place as well as software security solutions that can protect both the data and application security on these edge devices.

Resilience

Edge systems are generally managed with little or no skilled IT professionals on hand to assist in the event of a crash. Thus, edge management requires resilient infrastructure that can remediate issues on its own, as well as secure remote access when human intervention is required. Migrating applications when a system fails and restarting those applications automatically are core features of many cloud-native management solutions, making ongoing management of edge computing environments seamless.

There are numerous benefits driving customers to move their compute systems nearer to their data sources in remote locations. Customers need to consider how edge computing is different from data center or cloud computing they have traditionally relied on, and invest in new ways of provisioning, securing, and managing these environments. 

Learn more about the Top Considerations for Deploying AI at the Edge by downloading the free white paper. 

Categories
Misc

Training dataset from mp4 videos + Json objects?

Hey, I’m new to tensorflow although I’ve played around with image classification using python before,

I was wondering if it’s possible to input mp4 videos which also have related json objects which show hashtags, titles, usernames and likes etc for that video to train tensorflow with? I have a lot of these videos saved already (5,000+) along with their corresponding json and I wanted to try to train a neural net to see if it would pick similar videos that I would when inputting an mp4 and it’s json. Greatly appreciate any answers on whether this is possible and would work and pointing me in the right direction!

submitted by /u/GergDanger
[visit reddit] [comments]

Categories
Misc

can @tf.function change the learning result?

Hi everybody! It’s my first post here and I’m a beginner with TF too.

I’m trying to implement deep q-learning on the Connect 4 game. Reading some examples on the internet, I’ve understood that using the decorator tf.function can speed up a lot the training, but it has no other effect than performance.

Actually, I have noticed a different behavior in my function:

@tf.function # do I need it? def _train_step(self, boards_batch, scores_batch): with tf.GradientTape() as tape: batch_predictions = self.model(boards_batch, training=True) loss_on_batch = self.loss_object(scores_batch, batch_predictions) gradients = tape.gradient(loss_on_batch, self.model.trainable_variables) self.optimizer.apply_gradients(zip( gradients, self.model.trainable_variables )) self.loss(loss_on_batch) 

In particular, if I train without tf.function the agent is not learning anything and it performs as the Random agent. Instead, if I use tf.function the agent easily beats the random agent after only 1000 episodes.

Do you have any idea why is this happening? Do I have misunderstood something about tf.function?

If I try to remove tf.function from TF example notebooks nothing changes a part from the performance, as I expect from my understanding of tf.function.

submitted by /u/Lake2034
[visit reddit] [comments]

Categories
Misc

Sparking Transformation: How GPUs Busted Through a Once-Impossible Analytics Job

With persistence and the right tools, Deborah Tylor was able to do the impossible. A data scientist, she was tasked to comb a 3+ terabyte dataset at the Internal Revenue Service for patterns that might help uncover fraud. But even when she let the job run all night on a large bank of CPU servers Read article >

The post Sparking Transformation: How GPUs Busted Through a Once-Impossible Analytics Job appeared first on The Official NVIDIA Blog.

Categories
Misc

TensorFlow 2 Pocket Reference ebook

TensorFlow 2 Pocket Reference ebook submitted by /u/insanetech_
[visit reddit] [comments]
Categories
Misc

Error with Sequential()

Hi, i am just starting with Tensorflow for my AI and i ran into an error i don’t know how to solve

[2021-09-06 21:55:50.461476: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2

To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

2021-09-06 21:55:51.050032: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1510] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 2781 MB memory: -> device: 0, name: NVIDIA GeForce GTX 970, pci bus id: 0000:01:00.0, compute capability: 5.2

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasoptimizer_v2optimizer_v2.py:355: UserWarning: The `lr` argument is deprecated, use `learning_rate` instead.

warnings.warn(

2021-09-06 21:55:51.508673: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] None of the MLIR Optimization Passes are enabled (registered 2)

Epoch 1/200

Traceback (most recent call last):

File “C:UsersGamereclipse-workspaceAItraining_jarvis.py”, line 69, in <module>

model.fit(np.array(training_1), np.array(training_2), epochs=200, batch_size=5, verbose=2)

File “C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasenginetraining.py“, line 1184, in fit

tmp_logs = self.train_function(iterator)

File “C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythoneagerdef_function.py”, line 885, in __call__

result = self._call(*args, **kwds)

File “C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythoneagerdef_function.py”, line 933, in _call

self._initialize(args, kwds, add_initializers_to=initializers)

File “C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythoneagerdef_function.py”, line 759, in _initialize

self._stateful_fn._get_concrete_function_internal_garbage_collected( # pylint: disable=protected-access

File “C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythoneagerfunction.py“, line 3066, in _get_concrete_function_internal_garbage_collected

graph_function, _ = self._maybe_define_function(args, kwargs)

File “C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythoneagerfunction.py“, line 3463, in _maybe_define_function

graph_function = self._create_graph_function(args, kwargs)

File “C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythoneagerfunction.py“, line 3298, in _create_graph_function

func_graph_module.func_graph_from_py_func(

File “C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythonframeworkfunc_graph.py”, line 1007, in func_graph_from_py_func

func_outputs = python_func(*func_args, **func_kwargs)

File “C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythoneagerdef_function.py”, line 668, in wrapped_fn

out = weak_wrapped_fn().__wrapped__(*args, **kwds)

File “C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythonframeworkfunc_graph.py”, line 994, in wrapper

raise e.ag_error_metadata.to_exception(e)

TypeError: in user code:

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasenginetraining.py:853 train_function *

return step_function(self, iterator)

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasenginetraining.py:842 step_function **

outputs = model.distribute_strategy.run(run_step, args=(data,))

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythondistributedistribute_lib.py:1286 run

return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythondistributedistribute_lib.py:2849 call_for_each_replica

return self._call_for_each_replica(fn, args, kwargs)

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythondistributedistribute_lib.py:3632 _call_for_each_replica

return fn(*args, **kwargs)

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasenginetraining.py:835 run_step **

outputs = model.train_step(data)

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasenginetraining.py:787 train_step

y_pred = self(x, training=True)

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasenginebase_layer.py:1037 __call__

outputs = call_fn(inputs, *args, **kwargs)

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasenginesequential.py:369 call

return super(Sequential, self).call(inputs, training=training, mask=mask)

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasenginefunctional.py:414 call

return self._run_internal_graph(

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasenginefunctional.py:550 _run_internal_graph

outputs = node.layer(*args, **kwargs)

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasenginebase_layer.py:1037 __call__

outputs = call_fn(inputs, *args, **kwargs)

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskeraslayerscore.py:212 call

output = control_flow_util.smart_cond(training, dropped_inputs,

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskerasutilscontrol_flow_util.py:105 smart_cond

return tf.__internal__.smart_cond.smart_cond(

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packagestensorflowpythonframeworksmart_cond.py:56 smart_cond

return true_fn()

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskeraslayerscore.py:208 dropped_inputs

noise_shape=self._get_noise_shape(inputs),

C:UsersGamerAppDataLocalProgramsPythonPython39libsite-packageskeraslayerscore.py:197 _get_noise_shape

for i, value in enumerate(self.noise_shape):

TypeError: ‘int’ object is not iterable]

I guess it’s about the model.fit line but i am not sure, for reference here is a bit of my code:

[training_1 = list(training_ai[:,0])

training_2 = list(training_ai[:,1])

model = Sequential()

model.add(Dense(128, input_shape=(len(training_1[0]),),activation=’relu’))

model.add(Dropout(0,5))

model.add(Dense(64, activation = ‘relu’))

model.add(Dropout(0,5))

model.add(Dense(len(training_2[0]),activation=’softmax’))

sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)

model.compile(loss=’categorical_crossenropy’, optimizer=sgd, metrics=[‘accuracy’])

model.fit(np.array(training_1), np.array(training_2), epochs=200, batch_size=5, verbose=2)]

I would be happy if you could help me with this Error

submitted by /u/HeroOfComputers
[visit reddit] [comments]