Questions tagged [accelerate]

Make large-scale mathematical computations and image calculations, optimized for high performance.

74 questions
12
votes
1 answer

How to smooth interpolation of a float array into a bigger array?

I'm stuck with interpolation in Swift. Can anyone help me with that? I want to interpolate the float array (say [0, 0, 100, 25, 0, 0, 0, 25, 0, 0, 0]) into another array with some given size (for example 128). I found an article (Use Linear…
aibek
  • 161
  • 8
3
votes
1 answer

Having problems running numpy - error about ‘buggy accelerate backend’? (python, vs code, OS X)

Very new python learner here. Trying to build my first project, but having so many issues with numpy. When I try to run the programme, it comes back with this error: RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a…
Lorne Ashley
  • 83
  • 1
  • 7
3
votes
1 answer

Accelerate a pandas operation involving several dataframes

Hello everyone For a school project, I am stuck with the duration of an operation with Pandas Dataframe. I have one dataframe df which shape is (250 000 000, 200). This dataframe contains values of variable describing the behaviours of sensors on a…
3
votes
0 answers

Overriding Conda Package Installation with Pip

I'm trying to build the necessary dependencies to run some deep learning code and am running into issues with the c foreign function interface (cffi) installation. I need conda's accelerate package, however the package is built on top of an old…
3
votes
0 answers

Problems upsampling data using accelerate

After I downsample a vector with a constant decimating factor, I want to upsample the vector back to the original sample rate (after performing some analyses). However, I am struggling with the upsampling. For the downsampling I apply vDSP_desamp…
Gerard
  • 349
  • 2
  • 16
2
votes
1 answer

ImportError: Using `low_cpu_mem_usage=True` or a `device_map` requires Accelerate: `pip install accelerate`

Using HuggingFace Transformer I am trying to create a pipeline, by running below code (code is running on a SageMaker Jupyter Lab): pipeline = transformers.pipeline( "text-generation", model="meta-llama/Llama-2-7b-chat-hf", …
2
votes
2 answers

AttributeError: 'AcceleratorState' object has no attribute 'distributed_type'

import transformers from datasets import load_dataset import tensorflow as tf tokenizer = transformers.AutoTokenizer.from_pretrained('roberta-base') df = load_dataset('csv', data_files={'train':'FinalDatasetTrain.csv',…
Amr Samer
  • 21
  • 1
2
votes
2 answers

ImportError: Using the `Trainer` with `PyTorch` requires `accelerate`

I wrote a code to train a NER model before few months and it was working well. However, the same code now gives me this error: ImportError: Using the `Trainer` with `PyTorch` requires `accelerate`: Run `pip install --upgrade accelerate` I tried to…
Reem
  • 107
  • 1
  • 7
2
votes
1 answer

Swift, array, image processing. Is using array.map() the fastest way to process all data in an array?

I have an array with many millions of elements (7201 x 7201 data points) where I am converting the data to a greyscale image. var imagePixels = heights.map { terrainToColorScale($0.height, gradient: .Linear) } let _ = writeImageToFile(imagePixels,…
KieranC
  • 57
  • 6
2
votes
0 answers

vDSP Biquad Remove Transient Signals Swift

I am using Apple's Accelerate Framework, vDSP biquad function https://developer.apple.com/documentation/accelerate/1450838-vdsp_biquad?language=objc#parameters in order to emulate pythons sosfilt function. I have done all the filtering but notice I…
2
votes
0 answers

Using Swift Generics to Call a Non-Generic Library

I'm trying to write a generic Swift wrapper for some of the vector operations in the Accelerate vDSP framework and I'm running into a problem calling the functions in a generic way. My vector struct looks like: public struct Vector { let array:…
jkanji
  • 21
  • 1
2
votes
1 answer

How to use linear interpolation from Accelerate

I am trying to linearly interpolate new values from a data set using Apple's Accelerate framework. I've used this piece of documentation for implementing my code, but I am facing issues when I try to interpolate a set of values that are under 1,…
Pondorasti
  • 607
  • 6
  • 14
2
votes
1 answer

Matlab: Faster finding of 1D linear interpolation nodes and weights for each element in ND matrix

In a problem I'm working on now, I compute some values in a matrix x and I then for each element in x need to find the index of the closest element below in a monotonically increasing vector X as well as the relative proximity of the x elements to…
Fredrik P
  • 682
  • 1
  • 8
  • 21
2
votes
1 answer

Accelerate - Lower the threshold for contrast stretching

I am using Swift and Accelerate and am trying to color-correct an image using the vImageContrastStretch method available in Accelerate's vImage module. When I try to stretch the histograms I get a result which does do exactly what I want, but it is…
2
votes
1 answer

KeyError: dtype('int32') for Anaconda Accelerate library

I'm trying to learn how to use anaconda's accelerate library. As per https://docs.anaconda.com/accelerate/cublas.html, the amin() method "finds the index of the first largest element in array x. Same as np.argmax(x)". Here is my code: import…
Sioy
  • 23
  • 5
1
2 3 4 5