artificial-intelligence

How to fix flatlined accuracy and NaN loss in tensorflow image classification

心已入冬 提交于 2021-02-11 18:05:34
问题 I am currently experimenting with TensorFlow and machine learning, and as a challenge, I decided to try and code a machine learning software, on the Kaggle website, that can analyze brain MRI scans and predict if a tumour exists or not. I did so with the code below and began training the model. However, the text that showed up during training showed that none of the loss values (training or validation) had proper values and that the accuracies flatlined, or fluctuated between two numbers (the

About PDDL in AI planning

独自空忆成欢 提交于 2021-02-11 17:23:58
问题 I am trying to solve a Pacman-style problem with a planner, using PDDL. I assume there are many food in the given map. I use exists to check if here is any other food in the map, but it does not work; why is that? Here is my problem file: (define (problem pacman-level-1) (:domain pacman_simple) ;; problem map ;; | 1 | 2 | 3 | ;; -|---|---|---| ;; a| P | G | F | ;; b| _ | _ | _ | ;; |---|---|---| (:objects a1 a2 a3 b1 b2 b3 - cell pacman - pacman ghost - ghost food1 - food food2 - food nofood

About PDDL in AI planning

て烟熏妆下的殇ゞ 提交于 2021-02-11 17:23:50
问题 I am trying to solve a Pacman-style problem with a planner, using PDDL. I assume there are many food in the given map. I use exists to check if here is any other food in the map, but it does not work; why is that? Here is my problem file: (define (problem pacman-level-1) (:domain pacman_simple) ;; problem map ;; | 1 | 2 | 3 | ;; -|---|---|---| ;; a| P | G | F | ;; b| _ | _ | _ | ;; |---|---|---| (:objects a1 a2 a3 b1 b2 b3 - cell pacman - pacman ghost - ghost food1 - food food2 - food nofood

ValueError: Input 0 is incompatible with layer conv2d_5: expected ndim=4, found ndim=2

烂漫一生 提交于 2021-02-11 15:19:09
问题 I am trying to build a CNN network and wuld like to probe the layer dimention using output_shape. But it's giving me an error as follows: ValueError: Input 0 is incompatible with layer conv2d_5: expected ndim=4, found ndim=2 Below is the code I am trying to execute from keras.layers import Activation model = Sequential() model.add(Convolution2D(32, 3, 3, activation='relu', input_shape=(1,28,28))) print(model.output_shape) 回答1: You can check if by default the number of channels is specified at

Detect missing objects in a video

蓝咒 提交于 2021-02-11 12:07:00
问题 I was wondering how can a missing object be detected using something similar to YOLO? Let's say I have the first video capturing a smartphone, keys and a passport. Then I have another video capturing the smartphone and keys only, is it possible to put up a warning stating that there is an object missing? 回答1: Yes. If you are using the python version of AlexeyAB darknet, you can see all the detections in this line: https://github.com/AlexeyAB/darknet/blob/master/darknet_video.py#L81 Then

Tic Tac Toe AI Bugs

北慕城南 提交于 2021-02-10 22:27:42
问题 I'm trying to implement an AI for Tic Tac Toe that is smart enough to never lose. I've tried two different algorithms but the AI still makes mistakes. I started with this minimax alpha-beta pruning algorithm. Here's a live demo: http://iioengine.com/ttt/minimax.htm It runs without error, but if you take the bottom left corner first, then either of the other two squares on the bottom row - the AI doesn't see that coming. I'm sure this isn't a flaw in the minimax algorithm - can anyone see an

Tic Tac Toe AI Bugs

江枫思渺然 提交于 2021-02-10 22:26:33
问题 I'm trying to implement an AI for Tic Tac Toe that is smart enough to never lose. I've tried two different algorithms but the AI still makes mistakes. I started with this minimax alpha-beta pruning algorithm. Here's a live demo: http://iioengine.com/ttt/minimax.htm It runs without error, but if you take the bottom left corner first, then either of the other two squares on the bottom row - the AI doesn't see that coming. I'm sure this isn't a flaw in the minimax algorithm - can anyone see an

Tensorflow ValueError: Failed to find data adapter that can handle input

﹥>﹥吖頭↗ 提交于 2021-02-10 20:32:08
问题 Hello I'm trying to make the basic example of tensorflow minst using data from images on my pc. But I run into this error all the time: "ValueError: Failed to find data adapter that can handle input: , ( containing values of types {""})" here's how i generate data: import numpy as np # for array operations import matplotlib.pyplot as plt # to show image import os # to move through directories import cv2 # to make image operations import random import pickle DATADIR=r"C:\Users\...\mnist_png

Shape error when passed custom LSTM

六月ゝ 毕业季﹏ 提交于 2021-02-10 14:21:01
问题 I have been trying to custom a LSTM layer for further improvement. But an error which seems like normal raised at pooling layer after my custom LSTM. My environment is: win 10 keras 2.2.0 python 3.6 Traceback (most recent call last): File "E:/PycharmProjects/dialogResearch/dialog/classifier.py", line 60, in model = build_model(word_dict, args.max_len, args.max_sents, args.embedding_dim) File "E:\PycharmProjects\dialogResearch\dialog\model\keras_himodel.py", line 177, in build_model l_dense =

Use Artificial Intelligence to predict next number (n+1) in a sequence

半腔热情 提交于 2021-02-08 12:09:45
问题 The AI must predict the next number in a given sequence of incremental integers using Python, but so far I haven't gotten the intended result. I tried changing the learning rate and iterations but so far without any luck. The next number is supposed to be predicted based on this PATTERN : First number in the sequence (1) is a random int in the interval of [2^0 (current index), 2^1(next index) and so on so forth... The AI should be able to make the decision of which number to choose from the