artificial-intelligence

AI algorithm for adjust percentages and constant coefficients values

AI algorithm for adjust percentages and constant coefficients values Question: I’m making an application that will help the people to donate stuff in one delivery point and then the application will determine who suits the item donated perfectly (the beneficiaries who receive the donations are inserted in the database previously) I’m making an algorithm to …

Total answers: 1

How to handle user uploaded files in a fastapi app [fastapi]

How to handle user uploaded Image files in a FastAPI app? Question: I am writing an API for an AI model. This AI model gets images from a folder named input, does the process on the image or images and outputs the result in another folder named output in CSV format, which is then converted …

Total answers: 1

Python problem with libraries. I got some error

Python problem with libraries. I got some error Question: I was trying to download imageai using pip module and I got following error: ERROR: tensorflow-intel 2.11.0 has requirement keras<2.12,>=2.11.0, but you’ll have keras 2.4.3 which is incompatible. ERROR: tensorflow-intel 2.11.0 has requirement numpy>=1.20, but you’ll have numpy 1.19.3 which is incompatible. I don’t know what …

Total answers: 1

TypeError: Input 'y' of 'Mul' Op has type float32 that does not match type int64 of argument 'x'. in computer vision

TypeError: Input 'y' of 'Mul' Op has type float32 that does not match type int64 of argument 'x'. in computer vision Question: I’m working in training my model. so, I do: # create the base pre-trained model base_model = DenseNet121(weights=’/Users/awabe/Desktop/Project/PapilaDB/ClinicalData/DenseNet-BC-121-32-no-top.h5′, include_top=False) x = base_model.output # add a global spatial average pooling layer x = GlobalAveragePooling2D()(x) …

Total answers: 1

Python Error: ValueError: shapes (4,2) and (4,2) not aligned: 2 (dim 1) != 4 (dim 0)

Python Error: ValueError: shapes (4,2) and (4,2) not aligned: 2 (dim 1) != 4 (dim 0) Question: I’m trying to make an ANN from scratch and I’ve run into a big problem… from math import * from random import random import numpy as np training = np.array([[0,0], [0,1], [1,0], [1,1]]) trainingLabels = np.array([0, 1, 1, …

Total answers: 1

can I use .h5 file in Django project?

can I use .h5 file in Django project? Question: I’m making AI web page using Django and tensor flow. and I wonder how I add .h5 file in Django project. writing whole code in views.py file but I want to use pre-trained model not online learning in webpage. Asked By: Gyuyeon Cho || Source Answers: …

Total answers: 1

separation of training data pyTorch

separation of training data pyTorch Question: I have a code, with it, I wanted to train a neural network and save the finished model as a file. But I am getting an error due to incorrect distribution of training and training data. Can’t understand why: `import torch import torch.nn as nn import torch.optim as optim …

Total answers: 2

Python sentence transformer community detection code getting stuck on line 16

Python sentence transformer community detection code getting stuck on line 16 Question: Hi I have been playing with this code from last 3-4 days but no luck. Here is the code from sentence_transformers import SentenceTransformer, util model = SentenceTransformer(‘all-MiniLM-L6-v2’) sentences3 = [‘USPS IV USA Tracking Status WTA Portal to content Home ures Plans About Us …

Total answers: 1

Terminal error from download_bios.py: the following arguments are required: wetpaths

Terminal error from download_bios.py: the following arguments are required: wetpaths Question: I’ve been attempting to download a dataset downloaded off of PapersWithCode and when I run the download program I get the following error message: usage: download_bios.py [-h] [-o OUT] [-r RETRIES] [-p N] wetpaths download_bios.py: error: the following arguments are required: wetpaths and am …

Total answers: 1

Is is still considered a BFS algorithm if I modify it A little bit?

Is is still considered a BFS algorithm if I modify it A little bit? Question: So I’m trying to create a program that finds the shortest path from nodeA to nodeB, however, I want to block certain nodes so that it would find another path. I’m not really aiming for an optimal code here I’m …

Total answers: 1