As I asked here on StackOverflow, I’m having problems building a model with strings as input since the input layer is a tf.keras.Input(shape=(1,), dtype=tf.string, name=’text’) but the BERT tokenizer expects a string. How do you extract the input string from the keras input?
Hello, I’ve just started learning and messing around with neural networks. I’m not sure if this is a problem, or this is how neural networks work, but I’ve noticed, that whenever I try to predict a binary classification outcome with my model, the predictions vary completely based on the size of the data i pass it.
For example, if I try to predict a single outcome with one row of data, I get something like 0.4. Then if I add another row of data and predict again, the first prediction of row 1 becomes 0.9, even though the data in row 1 did not change, I only added an additional row of data for an additional prediction.
My training data consists of 1266 entries with 54 features. I’ve tried reducing the batch_size to 1, different optimizers, number of layers, number of neurons and the result is mostly the same. Is this normal behavior?
Idea generation, not hardware or software, needs to be the bottleneck to the advancement of AI, Bryan Catanzaro, vice president of applied deep learning research at NVIDIA, said this week at the AI Hardware Summit. “We want the inventors, the researchers and the engineers that are coming up with future AI to be limited only Read article >
The post Pushing Forward the Frontiers of Natural Language Processing appeared first on The Official NVIDIA Blog.
I have an object detection model (Faster R-CNN sved as a frozen graph) that was trained over two years ago. It requires TF GPU 1.14 and the TF Object Detection API. It’s a bit of a hassle to setup that environment and was wondering if there was a more streamlined way to use that model with the latest version of TF/Keras?
This feels like a profoundly stupid question, and maybe that’s why I’m not finding any answers to it… am new to machine learning.
I’m used to doing development inside VMs, but as I want to benefit from the GPU that’s not really an option here, right? I was thinking maybe I could do it in a Docker container instead (am on Windows) but not sure that’s viable, either. Would either a VM or Docker work for Windows and doing ML? Thanks.
Want to play awesome PC games for free without having to buy an expensive gaming rig? This GFN Thursday takes a look at the 90+ free-to-play PC games — including this week’s Fortnite Season 8 release and the Epic Games Store free game of the week, Speed Brawl, free to claim Sept. 16-23 — all Read article >
I am on tf_nightly-2.7.0 and used tensorflow’s “make_csv_dataset” to make dataset from a TSV file, but it seems the Tensorflow PrefetchDataset doesn’t have shape information. I could have used Pandas dataframe but would like to try Tensorflow’s dataset. Here are codes without the import:
!wget https://cdn.freecodecamp.org/project-data/sms/train-data.tsv train_file_path = "train-data.tsv" train_data = tf.data.experimental.make_csv_dataset(train_file_path, header=False, field_delim='t', column_names=['label', 'text'], batch_size=5, label_name='label', num_epochs=1, ignore_errors=True) examples, labels = next(iter(train_data)) # Just the first batch. print("FEATURES: n", examples, "n") print("LABELS: n", labels) encoder = keras.layers.TextVectorization(max_tokens=None, output_mode='int', output_sequence_length=160) encoder.adapt(train_data)
Here is how the dataset looks in the print output:
FEATURES: OrderedDict([('text', <tf.Tensor: shape=(5,), dtype=string, numpy= array([b'rt-king pro video club>> need help? email@example.com or call 08701237397 you must be 16+ club credits redeemable at www.ringtoneking.co.uk! enjoy!', b'good afternoon sunshine! how dawns that day ? are we refreshed and happy to be alive? do we breathe in the air and smile ? i think of you, my love ... as always', b'they have a thread on the wishlist section of the forums where ppl post nitro requests. start from the last page and collect from the bottom up.', b'no current and food here. i am alone also', b'die... i accidentally deleted e msg i suppose 2 put in e sim archive. haiz... i so sad...'], dtype=object)>)]) LABELS: tf.Tensor([b'spam' b'ham' b'ham' b'ham' b'ham'], shape=(5,), dtype=string)
Here is the error on line encoder.adapt(train_data) :
AttributeError: 'NoneType' object has no attribute 'ndims
The desired outcome would be no error message after manipulating the Tensorflow dataset.
Thank you for the help in advance!