Skip to content

Instantly share code, notes, and snippets.

@n-taku
n-taku / torchsummary.ipynb
Created March 23, 2020 13:31
torchsummaryのサンプル
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@n-taku
n-taku / MnistSample.ipynb
Created March 19, 2020 15:53
Mnistのサンプル
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@n-taku
n-taku / matplotlib.ipynb
Created March 19, 2020 15:38
matplotlibのサンプル
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@n-taku
n-taku / MnistModel.ipynb
Created March 18, 2020 13:59
モデルのサンプル
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@n-taku
n-taku / MnistDataSet.ipynb
Last active March 17, 2020 17:17
Mnistのデータセット
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@n-taku
n-taku / MnistInference_Paint.cs
Last active March 1, 2020 04:49
Physics.Raycastを飛ばして,当たったオブジェクトのuv座標を取得して,対応する場所のtextureの色を書き換える [blog](https://unitech.hatenablog.com/entry/2020/02/29/144249)
using UnityEngine;
using UnityEngine.UI;
public class Paint : MonoBehaviour
{
const int width = 28;
const int height = 28;
public MeshRenderer m;
public Button b;
@n-taku
n-taku / MnistInference.cs
Last active March 1, 2020 04:57
UnityでOnnx Runtimeを使ってMnistの手書き文字認識をする [blog](https://unitech.hatenablog.com/entry/2020/02/29/144249)
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Microsoft.ML.OnnxRuntime;
using Microsoft.ML.OnnxRuntime.Tensors;
public class MnistInference
{
private readonly InferenceSession session;
@n-taku
n-taku / RenderingFrameData.cs
Created December 22, 2019 07:39
RenderingのProfilerデータ
[Serializable]
public class RenderingFrameData
{
public int batches;
public int setPassCall;
public int triangles;
public int vertices;
}
public static RenderingFrameData ProcessRenderingFrameData(int frame)
@n-taku
n-taku / MemoryFrameData.cs
Last active December 22, 2019 07:40
MemoryのProfilerデータ
[Serializable]
public class MemoryFrameData
{
public int totalAllocated;
public int textureMemory;
public int meshMemory;
public int materialCount;
public int objectCount;
public int totalGCAllocated;
public int globalIllumination;
@n-taku
n-taku / CPUFrameData.cs
Last active December 22, 2019 08:56
CPUのProfilerデータ
[Serializable]
public class CPUFrameData
{
public float rendering;//ナノ秒
public float scripts;
public float physics;
public float animation;
public float garbageCollector;
public float VSync;
public float globalIllumination;