Categories
Misc

New Levels Unlocked: Africa’s Game Developers Reach Toward the Next Generation

Looking for a challenge? Try maneuvering a Kenyan minibus through traffic or dropping seed balls on deforested landscapes. Or download Africa’s Legends and battle through fiendishly difficult puzzles with Ghana’s Ananse or Nigeria’s Oya by your side. Games like these are connecting with a hyper-connected African youth population that’s growing fast. Africa is the youngest Read article >

The post New Levels Unlocked: Africa’s Game Developers Reach Toward the Next Generation  appeared first on The Official NVIDIA Blog.

Categories
Misc

NVIDIA GTC 2022 to Feature Keynote From CEO Jensen Huang, New Products, 900+ Sessions From Industry and AI Leaders

Top Technologists from Deloitte, Epic Games, Mercedes-Benz, Microsoft, Pfizer, Sony, Visa, Walt Disney, Zoom and More to Present

Categories
Misc

tf.squeseze or tf.squeeze ?

tf.squeseze or tf.squeeze ?

I dont think there is a function as ” tf.squeseze ” but it should be ” tf.squeeze “. Correct me if I am wrong.

On page: tf.einsum | TensorFlow Core v2.8.0

https://preview.redd.it/4qc6ahevsrh81.png?width=882&format=png&auto=webp&s=3bc5a96a8f85eed6b3b14ea1622fdc2e543d2e03

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

Categories
Misc

uploading app with TensorFlow filter to Heroku cause memory exceeded

Recently I’ve uploaded an application to Heroku with TensorFlow,

the problem is the basic memory that you get from Heroku is 512MB,

which causes the server to crash after loading images into the TensorFlow model when the images are high quality.

Process running mem=934M(182.5%)

Error R14 (Memory quota exceeded)

Process running mem=1108M(216.5%)

Error R15 (Memory quota vastly exceeded)

Then, a few times I exceeded over 1.2GB when using this model, so I bought 1GB.And then it used over 2.2GB

CODE:

import tensorflow_hub

import tensorflow

import numpy

import cv2

model = hub.load(‘https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2‘)

def load_image(img_path):

img = tensorflow.io.read_file(img_path)

img = tensorflow.image.decode_image(img, channels=3)

img = tensorflow.image.convert_image_dtype(img, tf.tensorflow)

img = img[tensorflow.newaxis, :]

return img

def stylize_img(content_image_path,style_image_path):

content_image = load_image(content_image_path)

style_image = load_image(style_image_path)

cv2.imwrite(‘styled_img.jpg’, cv2.cvtColor(np.squeeze(stylized_image)*255, cv2.COLOR_BGR2RGB))

img = tensorflow.io.read_file(‘styled_img.jpg’)

remove(‘styled_img.jpg’)

return img

how can I solve the memory issue?

submitted by /u/Open-Glove-5238
[visit reddit] [comments]

Categories
Misc

Map image to vector data using deep learning

I’m working on a project where basically I would like to take a relatively small binary image and train a DL model to produce a vector of 360 outputs, one for each angle (i.e. the amplitude response at every angle produced by the image in question). I’m trying to figure out how to best build this from a model perspective. I think some convolutional layers might make sense, but I’m not sure whether I should just build a dense layer with 360 outputs, one for each angle, or something else entirely (perhaps a convolutional AE or RNN/LSTM or something like that, since we’re looking at sequence data?) And I’m not sure how the fact angles are involved might change anything either. Any ideas are appreciated!

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

Categories
Misc

Weird Assertion Error: AssertionError: Duplicate registrations for type ‘experimentalOptimizer’

Hi, I am working on a simple ML project and I am getting an error I can’t seem to resolve. I am getting: AssertionError: Duplicate registrations for type ‘experimentalOptimizer’ when I try to run any TensorFlow program that has an optimizer. I uninstalled Python, TensorFlow, and Keras and then reinstalled all three. The Adam optimizer file is present as well as several other optimizers. I couldn’t find any other documentation on this error elsewhere so any help would be greatly appreciated, thanks.

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

Categories
Offsites

Oh, wait, actually the best Wordle opener is not “crane”…

Categories
Misc

How to upload files in a trained model to use it?

Hi,

The title says the question. Here is the code which works in a colab. How can I convert it to make it work in the local env?:

import numpy as np
from google.colab import files
from keras.preprocessing import image
uploaded = files.upload()
for fn in uploaded.keys():

# predicting images
path = ‘/content/’ + fn
img = image.load_img(path, target_size=(300, 300))
x = image.img_to_array(img)
x = x / 255
x = np.expand_dims(x, axis=0)
images = np.vstack([x])
classes = model.predict(images, batch_size=10)
print(classes[0])
if classes[0]>0.5:
print(fn + ” is a human”)
else:
print(fn + ” is a horse”)

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

Categories
Misc

I can’t seem to get Tensor Flow working on my 3070 for NLP or CNN

I have been using tensor flow for a while now but I just recently ran into a problem with one of my programs. While trying to create a convolutional network I got the error

Epoch 1/4 Process finished with exit code -1073740791 (0xC0000409) 

where I have never had this error before. I have all of the updated CUDA’s and CUDD’s and have them in the right folder so I don’t know what the problem is. Anything helps thanks.

#from keras.datasets import imdb from keras.preprocessing import sequence import tensorflow as tf VOCAB_SIZE = 88584 MAXLEN = 250 BATCH_SIZE = 64 (train_data, train_labels), (test_data, test_labels) = imdb.load_data(num_words=VOCAB_SIZE) train_data = sequence.pad_sequences(train_data, MAXLEN) test_data = sequence.pad_sequences(test_data, MAXLEN) model = tf.keras.Sequential([ tf.keras.layers.Embedding(VOCAB_SIZE, 32), # Graph vector form, 32 dimensions tf.keras.layers.LSTM(32), # Long-Short term memory tf.keras.layers.Dense(1, activation="sigmoid") # Between 0-1 ]) model.compile(optimizer=tf.keras.optimizers.RMSprop(), loss="mean_squared_error", metrics=[tf.keras.metrics.RootMeanSquaredError()]) history = model.fit(x=train_data, y=train_labels, batch_size=128, epochs=10) 

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

Categories
Misc

📢 New Course on TensorFlow and Keras by OpenCV

📢 New Course on TensorFlow and Keras by OpenCV submitted by /u/spmallick
[visit reddit] [comments]