SciSharp / NumSharp

High Performance Computation for N-D Tensors in .NET, similar API to NumPy.
https://github.com/SciSharp
Apache License 2.0
1.38k stars 192 forks source link

help me #418

Open mak27arr opened 4 years ago

mak27arr commented 4 years ago

what im do wrong np.meshgrid return only one NDArray, second always null

(scales, ratios) = np.meshgrid(np.array(scales), np.array(ratios)); scales = scales.flatten(); ratios = ratios.flatten(); // Enumerate heights and widths from scales and ratios var heights = scales / np.sqrt(ratios); var widths = scales np.sqrt(ratios); //Enumerate shifts in feature space var shifts_y = np.arange(0, shape[0], anchor_stride) feature_stride; var shifts_x = np.arange(0, shape[1], anchor_stride) * feature_stride; (shifts_x, shifts_y) = np.meshgrid(shifts_x, shifts_y); // Enumerate combinations of shifts, widths, and heights var (box_widths, box_centers_x) = np.meshgrid(widths, shifts_x); var (box_heights, box_centers_y) = np.meshgrid(heights, shifts_y);